Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Regular expression syntax?

Guest
Nov 02, 2017 Nov 02, 2017

Does anyone know the regular expression syntax used in the SearchRedactPatterns.xml file for pattern searching?

TOPICS
Acrobat SDK and JavaScript
969
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Nov 03, 2017 Nov 03, 2017

It's the JavaScript syntax.

On Fri, Nov 3, 2017 at 4:42 PM, lillianb67516946 <forums_noreply@adobe.com>

Translate
LEGEND ,
Nov 03, 2017 Nov 03, 2017

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 03, 2017 Nov 03, 2017

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 03, 2017 Nov 03, 2017

It's the JavaScript syntax.

On Fri, Nov 3, 2017 at 4:42 PM, lillianb67516946 <forums_noreply@adobe.com>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 03, 2017 Nov 03, 2017
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines