Is there a Regular Expression for Massachusetts Driver's Licenses?

book

Article ID: 160790

calendar_today

Updated On:

Products

Data Loss Prevention Endpoint Prevent Data Loss Prevention Network Monitor Data Loss Prevention Network Prevent for Email Data Loss Prevention Network Prevent for Web Data Loss Prevention Network Protect Data Loss Prevention Endpoint Discover

Issue/Introduction

Massachusetts is not in the Data Identifier for Drivers Licenses.  Due to Massachusetts state legislation, there is a need to look for these values.  Is there a regular expression that can be used? 

Resolution

This is a regex example for one of the MA Drivers License formats that only detects a DL with an uppercase ‘S’ at the beginning.  It is recommended to combine this with some DL related keywords which can most likely be obtained from an existing Data Identifier.

(?<=(^|(?:[^)+\d][^-\w+])))S\d{8.EN_US}(?=(?:[^-\w])|$)