Find, replace, find in files, replace in files, regular expressions
I am wondering if I had a line:
and I wanted to remove everything after &sid, how would I do this with the find and replace feature with regular expressions switched on.
- Posts: 5
- Joined: Thu Dec 07, 2006 12:00 am
UE 12, Perl/Unix style:
Don't forget CRLF after last line.
- Posts: 357
- Joined: Wed Nov 24, 2004 12:00 am
- Location: Germany
For completion, the UltraEdit style regular expression for this job is:
Find What: %^(&sid^)*$
Replace With: ^1
Well, the ^( ^) in the search string could be also removed when the replace string contains &sid instead of ^1.
Or if &sid is not at start of every line:
Find What: &sid*$
Replace With: &sid
- Grand Master
- Posts: 4064
- Joined: Thu Jul 29, 2004 11:00 pm
- Location: Vienna
Return to Find/Replace/Regular Expressions