Copy link to clipboard
Copied
Does anyone know the regular expression syntax used in the SearchRedactPatterns.xml file for pattern searching?
It's the JavaScript syntax.
On Fri, Nov 3, 2017 at 4:42 PM, lillianb67516946 <forums_noreply@adobe.com>
Copy link to clipboard
Copied
See Creating and Using Custom Redaction Patterns by Rick Borstein, Acrobat for Legal Professionals. This blog will explain how to create an entry within the Redaction Action's Find Patterns. The RegEx expression is the same for Regular Expressions.
Basic examples:
U.S. SSN: (\b)((\d{3}(-|\s|\.|_)\d{2}(-|\s|\.|_)\d{4})|(\d{9}))(\b)
That is a space followed by 3 numeric digits, then a "-" , space, ".", or "_", followed by 2 numeric digits, then a "-" , space, ".", or "_", followed by 4 numeric digits. Note all of the pattern must be matched.
Copy link to clipboard
Copied
Thanks for your response! Yes I read this article and am able to write regular expressions emulating this syntax. But, I was wondering what syntax (Perl, POSIX, etc) this is since my colleagues and I have been unable to identify it.
Copy link to clipboard
Copied
It's the JavaScript syntax.
On Fri, Nov 3, 2017 at 4:42 PM, lillianb67516946 <forums_noreply@adobe.com>
Copy link to clipboard
Copied
Acrobat and Adobe Reader use JavaScript along with some special PDF extensions. The Regular Expression is JavaScript but it will not be as flexible as the full JavaScript Regular Expression. No look forward or backward.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more