Page 1 of 1

find/replace keep delimiter?

Posted: Thu Jan 09, 2003 4:04 pm
by Tom G.
Hi,

I would like to use find/replace to find a 2 text strings separated by a delimiter: GTB,123

Next, I want to add additional text string between the existing strings and keep the delimiter:

replace with GTB,HELLO,123

I need to do this across a number of files and each file uses a different delimiter ",!@#$%^&^*()", for example.

Is this possible with TextPad??

Thanks,

Tom

Re: find/replace keep delimiter?

Posted: Mon Jan 13, 2003 9:27 am
by Berend
Assuming it's always GTB<delimiter>123:
find:
GTB(.+)123
replace:
GTB\1HELLO\1123

Make sure 'Regular Expression' is checked.

Berend

Re: find/replace keep delimiter?

Posted: Mon Jan 13, 2003 7:00 pm
by Jeff Epstein
Try this:

Find: \([a-zA-Z0-9]\),\([a-zA-Z0-9]\)
Replace with: \1WHATEVER\2

Re: find/replace keep delimiter?

Posted: Mon Jan 13, 2003 7:01 pm
by Jeff Epstein
I meant this:

Find: \([a-zA-Z0-9]+\),\([a-zA-Z0-9]+\)