GREP needed: Finding duplicate last names in a list

Home Forums General InDesign Topics GREP needed: Finding duplicate last names in a list

This topic contains 3 replies, has 3 voices, and was last updated by  John Reynolds 4 days, 14 hours ago.

  • Author
    Posts
  • #122872

    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.

  • #122878

    Aaron Troia
    Member

    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

  • #122880

    Vinny –
    Member

    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

    • This reply was modified 4 days, 21 hours ago by  Vinny -.
  • #122886

    BINGO!!!!!

    Thanks so much, Vinny. This is a real keeper.

    JR

    • This reply was modified 4 days, 14 hours ago by  John Reynolds.

You must be logged in to reply to this topic.