Custom Data Pattern Creation Tips and Tricks

Printer Friendly Page

You're probably well aware that Prisma SaaS offers lots of built in data patterns. What if you need something special just for your circumstance? This is where custom data patterns can be an incredibly helpful tool. But how do you know if your regular expression is matching what you need?


Testing your custom data pattern

We're kind of a fan of a couple of regular expression testing tools. The Prisma SaaS Administrator's Guide mentions RegExr as being particularly cool. Our Customer Success Engineers also like Regular Expressions 101.


Give this a whirl

  • Download a test DLP File or take the content of the file such as
    • A Microsoft Word document that has US Social Security Numbers in the file
    • A PDF document that has Credit Card Numbers
  • Copy the content of that file into the Test String/Text Area on Regex Test sites

    regex checker.png

 

  • Begin developing your regular expression until you are accurately identifying the data that you are looking for.
  • Test your regular expression pattern against multiple variations of the data you want to extract.
    • Pro Tip: You can verify how the regular expression will search the content by looking at how many legitimate matches are found in the test string.
  • Fine tune your data pattern's accuracy.

    regex checker 2.png

A pattern to try

This pattern will accurately identify a few types of SSNs

(\d{3}[.| |-]\d{2}[.| | -]\d{4}) 
  • This will match these 3 SSN types (more test numbers are available from ssa.gov ) 
    • SSN Type 1: 158-50-9453
    • SSN Type 2: 757-35-5674
    • SSN Type 3: 978-30-5874
Tags (4)