1 Reply Latest reply on Aug 17, 2015 11:42 AM by tonyw

    NDLP Regex for Credit cards information

    mkanchug

      Hi,

       

      I would like to expression for containing specific number and ending the expressions as follows:

       

      Eg Expression: 43336\d\d\d\d\d\d\d\d\d\d\d

      For example if have expression to start with 5 numbers (43336) and should limit to 16 digit.

       

      If I validate the above expression with 16 digits or morethan 16 digits it validate as true.How can i limit false positive and end at 16 digits.


      And also I want to know the expression containing specific 5 digits numbers (43336) whereever positioned in the string.

       

      Thank you.

        • 1. Re: NDLP Regex for Credit cards information
          tonyw

          While in the concept page, you can click on "help" towards the top right of the page to pull up the "Regular Expression Syntax for Concepts" section.

           

          It validates because the 16 digits exists as your expression asks for.  However, your expression is missing some form of break at the beginning or end.  So any number starting with 43336 at least 16 digits or longer is going to trigger. 

          You will trigger on:

          4333612345678901abc or 433612345678901123

          abc433612345678901 or 890433612345678901abc

           

          So try adding a \s or \p to the expression.  If it is a credit card, you'll also want to enable the luhn10 algorithm in the concept builder.