Hi
I have a particular requirement to search for any character at the end of a line followed by a CRLF followed again by any character at the beginning of the next line. I then need to replace the same text except the CRLF which would become a space. I should say that each paragraph is separated by a line space above and below it throughout the file.
I'm pretty certain this can be done with Textpad but so far I've never found a way of achieving my aim. Essentially the replacement needs to replace the terxt characters found in the search term but separated by a space. This ensires I don't lose characters from the end of one line and the beginning of the next line - but I do finish up with a paragraph appearing in one line however long that paragraph may be.
I am fully aware that this would involve using regular expressions but quite frankly, even though I've printed out the relevant topics from the help file I'm still very confused by them as there seems to be no indication that Textpad can do what I want it to do.
Up to now I've managed using PC Write (yes, I still occasionally use the program which, when I was on DOS, was to me the bees knees in word processors). The whole idea of this is to remove CRLFs from the end of EVERY LINE of very large/long text files so that I can import the resultant files into a DTP program (PagePlus X6) such that paragraphs fill the full width of the page. Essentially I need a search term which stores the characters found such that it then replaces them with the replacement term but with a space replacing the CRLF.
If anyone can help it would be very much appreciated. Thank you very much.
Tracey Woodmason
Removing CRLF from all lines in very long files
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
ben_josephs
- Posts: 2464
- Joined: Sun Mar 02, 2003 9:22 pm
Use "Posix" regular expression syntax:
Search | Replace... (<F8>):Configure | P references | Editor
[X] Use POSIX regular expression syntax
But if you search in the help for join lines it will take you to How To ... | Edit Text | Join Lines, which describes an easier way to do it.Find what: (.)\n(.)
Replace with: \1 \2
[X] Regular expression
Replace All