Sep 27 2019 02:42 AM - edited Sep 27 2019 07:36 PM
What is the O365 DLP regex for digit string below (including spaces)?
1234 1234 1234 1234
Sep 27 2019 10:35 AM
SolutionThere are probably dozen different ways to match this string, you can try something like this:
"\d{4}\s\d{4}\s\d{4}\s\d{4}"
If you want to avoid leading/trailing numbers:
"\b\d{4}\s\d{4}\s\d{4}\s\d{4}\b"
If you want to match the actual numbers 1..4:
"\b[1-4]{4}\s[1-4]{4}\s[1-4]{4}\s[1-4]{4}\b"
Sep 27 2019 10:35 AM
SolutionThere are probably dozen different ways to match this string, you can try something like this:
"\d{4}\s\d{4}\s\d{4}\s\d{4}"
If you want to avoid leading/trailing numbers:
"\b\d{4}\s\d{4}\s\d{4}\s\d{4}\b"
If you want to match the actual numbers 1..4:
"\b[1-4]{4}\s[1-4]{4}\s[1-4]{4}\s[1-4]{4}\b"