Reply To: GREP Expression to find specific range of characters?

Home Page / Forums / General InDesign Topics (CLOSED) / GREP Expression to find specific range of characters? / Reply To: GREP Expression to find specific range of characters?

#55896

Our scholarly gent seems to have overseen something, though.

(?<=[^d{1,100}]t).{20,25}(?=t)

A variable number of elements in the look behind does not work. It simply doesn't do anything (perhaps the GREP returns an error message, but Adobe — infinite wisdom and all — decided to not pass those through to the user, leaving him to wonder why nothing happens).

Asides, everything inside the square brackets is put inside an OR-group, and the caron at the start inverts it to a NOT-group. I'm guessing it only appears to be working: it scans for a single character not (decimal or { or 1 or comma or 0 or }).

The most reliable check you can get, for a minimum number of preceding digits n (here 4), would be

(?<=d{4}t)[^t]{25,30}(?=t)

This article was last modified on June 3, 2010

Comments (0)

Loading comments...