My string looks like this
XXX1 Submited By Francis 2 ( xxxxxx @ hotmail . com ) XXX2
XXX1 Submited By Francis 1 ( xxcxxx @ gmail . com ) XXX3
I can find Submited By but how do I select up to )
I'd like to be left with
XXX1*XXX2
XXX1*XXX3
THanks
Steve
How to find/replace from point1 to point2
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
Find what:
Please note there is a space in front of 'Submited By'. The '.' character indicates find any character and the '*' means repeated zero or more times and then the search strings ends on the ')'
There are other ways to do this but this seems to fit in with the search you've already described.
I wasn't sure whether your 'X' and '*' characters indicated variable content here.
Hope this helps.
With regular expression enabled and POSIX regular expression syntax enabled in the general preferences.Submited By.*)
Please note there is a space in front of 'Submited By'. The '.' character indicates find any character and the '*' means repeated zero or more times and then the search strings ends on the ')'
There are other ways to do this but this seems to fit in with the search you've already described.
I wasn't sure whether your 'X' and '*' characters indicated variable content here.
Hope this helps.
Running TextPad 5.4 on Windows XP SP3 and on OS X 10.7 under VMWare or Crossover.
ThanksSteveH wrote:Find what:With regular expression enabled and POSIX regular expression syntax enabled in the general preferences.Submited By.*)
Please note there is a space in front of 'Submited By'. The '.' character indicates find any character and the '*' means repeated zero or more times and then the search strings ends on the ')'
There are other ways to do this but this seems to fit in with the search you've already described.
I wasn't sure whether your 'X' and '*' characters indicated variable content here.
Hope this helps.
That is what I needed - for some reason I thought ) was a reserved character.
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
Search for: ^(XXX1).*(XXX[0-9])$
Replace with: \1*\2
Converts from this:
XXX1 Submited By Francis 2 ( xxxxxx @ hotmail . com ) XXX2
XXX1 Submited By Francis 1 ( xxcxxx @ gmail . com ) XXX3
To this:
XXX1*XXX2
XXX1*XXX3
Use the following settings:
-----------------------------------------
[X] Regular expression
Replace All
-----------------------------------------
Configure | Preferences | Editor
[X] Use POSIX regular expression syntax
-----------------------------------------
Replace with: \1*\2
Converts from this:
XXX1 Submited By Francis 2 ( xxxxxx @ hotmail . com ) XXX2
XXX1 Submited By Francis 1 ( xxcxxx @ gmail . com ) XXX3
To this:
XXX1*XXX2
XXX1*XXX3
Use the following settings:
-----------------------------------------
[X] Regular expression
Replace All
-----------------------------------------
Configure | Preferences | Editor
[X] Use POSIX regular expression syntax
-----------------------------------------
Hope this was helpful.............good luck,
Bob
Bob