5 Replies Latest reply on Nov 12, 2015 2:26 AM by [Jongware]

    How can I use GREP to find 5 digit numbers only?

    Paulo19

      Hi,

       

      My document imports hundreds of products codes e.g. 12111

      I want to change the formatting of these codes to include a space after the first two digits e.g. 12 111

       

      I started with this: (\d{2})\d{3} but it finds the first five digits of any number >=5

      So I moved to these: \<(\d{2})\d{3}~b or \<(\d{2})\d{3}\> they work fine but include numbers like this: 457 12345 78 and  12345 000 00

      I don't want to change numbers like these as the document contains multiple patent/CRD numbers.

       

      So basically I need to find 5 digit numbers only. Excluding spaces before and after.

       

      Thanks