Replacing found wildcards with the same as the original

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

Replacing found wildcards with the same as the original

Post by MichaelGli » 2018-03-23 16:52:47

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: 900
Joined: 2007-02-07 00:58:12
Location: Japan

Re: Replacing found wildcards with the same as the original

Post by phspaelti » 2018-03-23 18:40:32

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: 17
Joined: 2015-08-28 22:00:43

Re: Replacing found wildcards with the same as the original

Post by MichaelGli » 2018-03-23 23:48:10

Thanks!

Post Reply