7 Replies Latest reply on Sep 27, 2013 3:03 PM by Larry G. Schneider

    indesign grep negative lookbehind puzzle

    jon_sask

      So I've got a telephone directory document, and I wanted to check that every number was correctly preceded by an area code. Eventually, I got where I wanted with the grep string: (?<!306-)\d\d\d-\d\d\d\d

       

      However, (?<!306-)\d\d\d- *didn't* work, ie. it found three digits and a dash that WERE preceded by 306- , as well as those that weren't.

       

      Why the difference? Any ideas? thanks.