find/replace keep delimiter?

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Tom G.

find/replace keep delimiter?

Post 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
Berend

Re: find/replace keep delimiter?

Post by Berend »

Assuming it's always GTB<delimiter>123:
find:
GTB(.+)123
replace:
GTB\1HELLO\1123

Make sure 'Regular Expression' is checked.

Berend
Jeff Epstein

Re: find/replace keep delimiter?

Post by Jeff Epstein »

Try this:

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

Re: find/replace keep delimiter?

Post by Jeff Epstein »

I meant this:

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