1 Reply Latest reply: Apr 24, 2014 1:02 AM by bphang RSS

    HDLP Regex " /b " Question

    leehouren

      Hi Community,

       

      Need help on the /b limitation

       

      Suppose i have a regex for Passport Numbers

      \b([A-Z]{1}[A-Z0-9]{1}[0-9]{7})\b

       

      Matched

      A12345678

       

      A12345678 A12345678

       

      Non-Matched

      ABA12345678

       

      A12345678A12345678

       

      -------------------------------------------------------------------------------- ---------------------------------------------------

       

      The issue im facing is with symbols and non words character, if included it will be considered as Matched. This has caused a lot of false positives,

       

      For example,

      .A12345678 = Matched

      #A12345678@$ = Matched

      %A12345678$ = Matched

       

      how can i exlude the non-words character?