Reply To: Grep duplicate-select first instance

Home Page / Forums / InDesign User Groups / Grep duplicate-select first instance / Reply To: Grep duplicate-select first instance

#98081
Alley J
Participant

Thanks for your reply, Graham. Upon re-reading, I realise I didn’t make it very clear (you know, I know what I mean!!). What it is, is 2 years of dates that when copied from the pdf, actually come in Jan\r\d, \d, \d+\rJan\r\d, \d, \d+\r, etc for the 2 years (so Jan 2017 followed by Jan 2018, followed by Feb 2017, then Feb 2018, etc, etc – I had changed the returns & comma-space to but originally it was as above – a return after each date & then each set of numbers). I needed to extract the set of 2017 months from the 2018. I got the 2018 by keeping only the duplicate set (using .*? for the numbers). But in the end, as time was a-wasting, I just changed it as nec. to become a table, cut that column & converted it back to text – it was the simplest solution but I’ve only picked up Grep in the last 2 or so years & so it was the (as someone else has put it), brain acrobatics? to see if it would work should it keep coming up again.

In another similar situation, I applied numbering to each line, changed the numbers to text & used that to distinguish which lines I wanted where. It was a bit round-about, but I got there!

But thank you for taking the time!

This article was last modified on September 14, 2017

Comments (0)

Loading comments...