Finding a string, and keeping the number...

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

jevticpd

Finding a string, and keeping the number...

Postby jevticpd » Tue Apr 26, 2005 2:31 pm

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: 2164
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Postby DataMystic Support » Wed Apr 27, 2005 6:26 pm

No, your search would be

test{[ capture( 1+ digits ) ]}

Replace with

hello{$1}
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments


Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot] and 8 guests