newbie to RE, first occurance?

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Tina

newbie to RE, first occurance?

Post 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
Dave Stillman

Re: newbie to RE, first occurance?

Post 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
Post Reply