Forum Moderators: coopster
Abc (123 abc stuff) 1xyz
I want to strip out the ()'s and everything between them to end up with:
Abc 1xyz
Any help would be greatly appreciated. Thanks.
- Bry
Abc (123 abc stuff) 1xyz
the following regular expression:
^([^(]*)\([^)]*\)([^)]*)$
will return everything up to but not including the first '(' in $1 and everything after the last ')' in $2.
ABC ID#: 123456 $123.45
the following regular expression:
^([^ ]*) [^$]*(\$[^$]*)$
will return everything up to but not including the first ' ' in $1 and everything after and including the last '$' in $2.
(strictly speaking, it probably won't match if you have more than one '$' in the string so you may have to further tweak the regexp if you have these cases.)