GREP needed: Finding duplicate last names in a list
- This topic has 3 replies, 3 voices, and was last updated 4 years, 2 months ago by .
- You must be logged in to reply to this topic.
Learn / Forums / General InDesign Topics / GREP needed: Finding duplicate last names in a list
Learn / Forums / General InDesign Topics / GREP needed: Finding duplicate last names in a list
I know how to find identical FULL paragraphs – ^(.+)*\K\1 – but I want to find paragraphs that have identical LEADS, such as a last name:
Allen, Artie
Allen, Arthur
Allen, Arthur A.
II’m basically looking for duplicate names that are not entered correctly.
Hey John,
Here was something I came up with, I’m not sure if will work for all of them, but it might be a step in the right direction.
(\w+), (\w+)( \w\.)?\n$1, $2
Aaron
Hi there,
hmmm tricky one…
You can give this one a shot:
^([^,]+),.+\r(\1.+\r)+
It will (well, should…) catch blocks of paragraphs if they follow each other AND start by the same “lead” (I used comma as separator as per your example)
Looking forward for your feedback.
Vinny
BINGO!!!!!
Thanks so much, Vinny. This is a real keeper.
JR
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!