Skip to main content
Community Expert
December 15, 2016
Answered

Grep to find price duplicated?

  • December 15, 2016
  • 2 replies
  • 1532 views

Any GREP gurus help  me with the following

If the price is 100.00 followed by a tab and 100.00

That's what I want to find

1247.00 \t 1247.00

120.00 \t 120.00

10.00 \t 10.00

etc.

Basically if it's a number followed by two digits separated by a tab with the same number after the tab - that's what I want to find.

Any ideas?

    This topic has been closed for replies.
    Correct answer Obi-wan Kenobi

    Hi Eugene,

    (\d+\.\d{2})\t\1

    (^/) 

    2 replies

    Mike Witherell
    Community Expert
    December 15, 2016

    Thank you Obi-wan; I didn't know that. I will add it to my GREP reference sheet:

    http://trainingonsite.com/images/downloads/indesign_cc_2015_grep_codes.pdf

    Mike Witherell
    Obi-wan Kenobi
    Obi-wan KenobiCorrect answer
    Brainiac
    December 15, 2016

    Hi Eugene,

    (\d+\.\d{2})\t\1

    (^/) 

    Community Expert
    December 15, 2016

    Sweet! That was fast!

    Obi-wan Kenobi
    Brainiac
    December 15, 2016

    That was simple! 

    (^/)