Page 1 of 1

Find/Replace text yet keep the same numbers?

Posted: 2013-12-06 06:16:09
by CrisB
Hi,

I sometimes need to Find a string such as "textabc-123-textdef" and Replace it with "textpqr-123-textst".

So I want to replace the initial text string "textabc" with "textpqr" keep the identical number "123" and then also replace the second text string "textdef" with "textst".

Can I keep the number in the middle unchanged with a Replace? How do I do this with Find/Replace PowerFind?

Any and all help in resolving this issue would be much appreciated, many thanks, Cris

Re: Find/Replace text yet keep the same numbers?

Posted: 2013-12-06 06:31:50
by phspaelti
Your find box should look like this:
Find_CrisB.tiff
Find_CrisB.tiff (88.24 KiB) Viewed 7749 times
The Capture(…) is in the Match menu (in the gear menu)
The AnyDigit is in the Wildcard menu.
The 3 Times is in the Repeat menu.

The Captured1 in the replace box is also in the Match menu. That will match what was found.

Re: Find/Replace text yet keep the same numbers?

Posted: 2013-12-06 07:03:20
by CrisB
Thanks, Philip, but I must be blind. Where's the Find_CrisB tiff attachment to view and/or download from your post? Can you download it from your post? If so, it must be a problem to do with Firefox 25.0.1 and Snow Leopard...

Re: Find/Replace text yet keep the same numbers?

Posted: 2013-12-06 07:06:08
by phspaelti
The CrisB.tiff is an image, and it should just be displayed here on the forum. Does it not display for you?
I'll try as jpg.
Find_CrisB.jpg
Find_CrisB.jpg (38.82 KiB) Viewed 7746 times

Re: Find/Replace text yet keep the same numbers?

Posted: 2013-12-06 07:19:02
by CrisB
Thanks, Philip, the Find Replace jpg is showing now.

much appreciate your help,
warm regards
Cris