Page 1 of 1

newbie to RE, first occurance?

Posted: Tue Dec 04, 2001 6:27 pm
by Tina
How do I find and replace only the first occurance of a string? Specifically, I want to replace, in many open documents:
</section>
</section>
(spaces and line breaks as shown)
with
</lesson>
Many Thanks in advance. Tina

Re: newbie to RE, first occurance?

Posted: Tue Dec 04, 2001 8:07 pm
by Dave Stillman
If you want to search for text on two different lines, you can include a \n (carrage return) in your search string.

Search for : <\/section>\n<\/section>
Replace with : <\/lesson>

Be sure to have "Regular Expression" searching enabled when you search, or it won't work.

Is that what you were wanting to do?

--Dave