Credit Card Number Filtering


We have made some improvements to the regular expressions that detect credit card number sequences since including the sample rule. Please follow the next steps to add the updated regular expressions:

  1. Go to Policy Patrol > Settings > Filters > Sample Filters > edit "Credit card and SSN" filter.
  2. Add the regular expressions below, each on a separate line (press Enter after adding each one)
    \b4[0-9]{3}[ -/]*[0-9]{4}[ -/]*[0-9]{4}[ -/]*[0-9]{4}\b
    \b5[1-5][0-9]{2}[ -/]*[0-9]{4}[ -/]*[0-9]{4}[ -/]*[0-9]{4}\b
    \b3[47][0-9]{2}[ -/]*[0-9]{4}[ -/]*[0-9]{4}[ -/]*[0-9]{3}\b
    \b3(?:0[0-5]|[68][0-9])[0-9]{1}[ -/]*[0-9]{4}[ -/]*[0-9]{4}[ -/]*[0-9]{2}\b
    \b6(?:011|5[0-9]{2})[ -/]*[0-9]{4}[ -/]*[0-9]{4}[ -/]*[0-9]{4}\b
    \b(?:2131|1800)[ -/]*[0-9]{4}[ -/]*[0-9]{4}[ -/]*[0-9]{3}\b
    \b35[0-9]{2}[ -/]*[0-9]{4}[ -/]*[0-9]{4}[ -/]*[0-9]{4}\b
  3. For each newly added regular expression, tick the box ‘Regular expression’ and enter 5 as the word score.
  4. Click OK.


Last Review: 2016-01-26 19:50:03 UTC

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Please sign in to leave a comment.