Finding a string, and keeping the number...

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
jevticpd

Finding a string, and keeping the number...

Post by jevticpd »

Hello all,

If I have this:

test{123} or test{345}

I want to match the text and the braces, but preserve the numeric portion of the string.

so, my search would be:
test{[digit]}

but what would I put in the replace section? Whould I use a varable?

Thanks.

Pete
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Post by DataMystic Support »

No, your search would be

test{[ capture( 1+ digits ) ]}

Replace with

hello{$1}
Post Reply