Replacing found wildcards with the same as the original

Everything related to our flagship word processor.
Post Reply
MichaelGli
Posts: 18
Joined: 2015-08-28 22:00:43

Replacing found wildcards with the same as the original

Post by MichaelGli »

Hi, sure this is in the manual but i can't find it.
I'm trying to add commas before most names, eg replace instances of "You shouldn't be doing that Graham." with "You shouldn't be doing that, Graham."
I'm finding the instances using wildcards for "Any lower case letter" "space" "Any upper case letter".
Next I need to replace the space with comma space, but my found set includes the preceding and following wild cards.
How do I set the replace to not change the wild card finds?
Thanks!
User avatar
phspaelti
Posts: 1313
Joined: 2007-02-07 00:58:12
Location: Japan

Re: Replacing found wildcards with the same as the original

Post by phspaelti »

You need to use "Match" parentheses, also known as "Capture()". You enclose all the bits you want to keep in such parentheses. You can do this by selecting the part of the find expression you want to keep, and choose "Match > Capture()". This will enclose that bit with parentheses. Repeat this for each bit you want to keep.
Then in the Replace box put "Captured1", "Captured2" etc. in the order you want them to appear in the replace expression.
philip
MichaelGli
Posts: 18
Joined: 2015-08-28 22:00:43

Re: Replacing found wildcards with the same as the original

Post by MichaelGli »

Thanks!
Post Reply