Find/Change Grep only finds one instance per paragraph, where am I going wrong?
- This topic has 1 reply, 1 voice, and was last updated 9 years, 3 months ago by .
- You must be logged in to reply to this topic.
Learn / Forums / General InDesign Topics / Find/Change Grep only finds one instance per paragraph, where am I going wrong?
Learn / Forums / General InDesign Topics / Find/Change Grep only finds one instance per paragraph, where am I going wrong?
Hi,
I’ve been using a Find/Change Grep to find any price with a comma and change that comma to a thin space (Newspaper’s editorial style).
But the Grep only finds the first instance of this per paragraph.
Sample text…
“$200,000 $200,000 $200,000.
text at start of paragraph $200,000
$200,000 text at end of paragraph
tab $200,000.”
In the sample the grep would miss the second and third price on the first line.
I’ve been using…
Find…
(?<=\$)(\d{3})\,?(\d{3})
also tried (\$\d{3})\,?(\d{3})
Change to…
$1~<$2
Is there anything I can add to find these last two prices?
I’ve been using this in combination with Batch Find Replace script, so different greps are set up for 5,6 and 7 digit numbers that start with $.
Thanks.
My question has been answered.
Both the greps below work to find all prices.
(?<=\x{0024})(\d{3})\,?(\d{3})
(?<=[$])(\d{3}),?(\d{3})
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies allows us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
To provide the best experiences, we and our partners use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us and our partners to process personal data such as browsing behavior or unique IDs on this site and show (non-) personalized ads. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Click below to consent to the above or make granular choices. Your choices will be applied to this site only. You can change your settings at any time, including withdrawing your consent, by using the toggles on the Cookie Policy, or by clicking on the manage consent button at the bottom of the screen.
You have to be logged in to save.
Not a member? Join Today - it's FREE!