Page 1 of 1

Find and replace over several lines

Posted: Thu Jan 24, 2008 2:56 pm
by ferdi77
I have a question concerning the find and replace function in textpad. I do not know how to find and replace an expression over several lines. For example I want to find everthing between the lines
\begin{}
here some text
\end{}
I know how I could do the search I the number between \begin and \end is fixed, but not if I do not know the certain number of lines. Is there a repitition character for \n?
Thank you very much for the help.
bye,
ferdi

Posted: Thu Jan 24, 2008 3:17 pm
by Bob Hansen
You could first do a Search/Replace for \n and replace with a unique character like "~".

Then do your RegEx for \begin ... \end.

Then replace "~" with "\n"

Posted: Thu Jan 24, 2008 3:23 pm
by ferdi77
Yes, thank you that works. Is there a restriction how long a line can be?
thanks,
ferdi