Find, replace, find in files, replace in files, regular expressions
by skallu » Tue Oct 04, 2005 5:42 pm
I am trying to do the following
Source Sample
- Code: Select all
"Due Date of first Instalment must be earlier than Due Date of second Instalment
Precondition: X.PRM.INST2DUE is displayed
X.PRM.INST1DUE < X.PRM.INST2DUE"
"Due Date of second Instalment must be earlier than Due Date of third Instalment
Precondition: X.PRM.INST3DUE is displayed
X.PRM.INST2DUE < X.PRM.INST3DUE"
Required End Result
- Code: Select all
"X.PRM.INST2DUE
X.PRM.INST1DUE
X.PRM.INST2DUE"
"X.PRM.INST3DUE
X.PRM.INST2DUE
X.PRM.INST3DUE"
Any help would be greatly appreciated. Thank you in advance.
Sanjay
-

skallu
- Newbie
-
- Posts: 4
- Joined: Tue Sep 27, 2005 11:00 pm
by Mofi » Wed Oct 05, 2005 5:26 am
For your example, this regular expression in UltraEdit style (see Advanced - Configuration - Find - Unix style Regular Expressions) will do it:
Find What: "*^p*^(X.PRM.[A-Z0-9]+^)*^p^(X.PRM.[A-Z0-9]+^)*^(X.PRM.[A-Z0-9]+^)"
Replace With: "^1^p^2^p^3"
-

Mofi
- Grand Master

-
- Posts: 4062
- Joined: Thu Jul 29, 2004 11:00 pm
- Location: Vienna
by skallu » Thu Oct 06, 2005 2:01 pm
Worked well.
Thanks a lot Mofi.
Sanjay
-

skallu
- Newbie
-
- Posts: 4
- Joined: Tue Sep 27, 2005 11:00 pm
Return to Find/Replace/Regular Expressions