Skip to main content
Participant
September 29, 2024
Answered

new pattern in SearchRedactPatterns.xml not recognized

  • September 29, 2024
  • 1 reply
  • 640 views

besides adding a new pattern, do i need to do anything for the new pattern to be recognized...

 

i just copied Entry1, pasted it at the bottom, called it Entry6, renamed it to 'my Phone Numbers', restarted acrobat DC...

'my Phone Numbers' is not listed...

 

i'm running this version...

 

 

 

thanks

 

<name> is place holder for my folder name...

 

C:\Users\<name>\AppData\Roaming\Adobe\Acrobat\DC\Redaction\ENU\SearchRedactPatterns.xml

 

<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<!DOCTYPE asf SYSTEM "http://ns.adobe.com/asf/asf_1_0.dtd">
<asf locale="en_US" version="1.0" xmlns="http://ns.adobe.com/asf">
<set name="Entry1">
<str name="displayName">
<val>Phone Numbers</val>
</str>
<str name="regEx" translate="no">
<val>(\b\s?)((\+?\d{1}(-|\s|\.|_))((\(\d{3}\)|\d{3})(-|\s|\.|_)?)|((\(\d{3}\)|\d{3})(-|\s|\.|_)?))?(\d{3}(-|\s|\.|_)\d{4})(\b)</val>
</str>
<str name="examples">
<val>This pattern will search for 7-digit phone numbers separated by punctuation marks, as well as leading area codes.

For example:
555-1212
212.555.1212
1 (212) 555-1212</val>
</str>
</set>
<set name="Entry2">
<str name="displayName">
<val>Credit Cards</val>
</str>
<str name="regEx" translate="no">
<val>(\b)(((\d{4}(-|\s|\.|_)?){3}(\d{3,4}))|(\d{4}(-|\s|\.|_)?\d{6}(-|\s|\.|_)?\d{5}))(\b)</val>
</str>
<str name="examples">
<val>This pattern will search for 16-digit credit card numbers, either consecutive or separated by punctuation marks.

For example:
1234-5678-9012-3456
1234567890123456
1234 5678 9012 3456</val>
</str>
</set>
<set name="Entry3">
<str name="displayName">
<val>Social Security Numbers</val>
</str>
<str name="regEx" translate="no">
<val>(\b)((\d{3}(-|\s|\.|_)\d{2}(-|\s|\.|_)\d{4})|(\d{9}))(\b)</val>
</str>
<str name="examples">
<val>This pattern will search for 9-digit social security numbers, either consecutive or 3 digits plus 2 digits plus 4 digits (separated by punctuation marks).

For example:
123-45-6789
123456789</val>
</str>
</set>
<set name="Entry4">
<str name="displayName">
<val>Email Addresses</val>
</str>
<str name="regEx" translate="no">
<val>([a-zA-Z0-9_])([a-zA-Z0-9_\-\.])*@([a-zA-Z0-9\-])+\.([a-zA-Z\.]+)</val>
</str>
<str name="examples">
<val>This pattern will search for email addresses.

For example:
John.Doe@acme.com
John_Doe_1234@acme.gov
j-doe@marketing.acme.net</val>
</str>
</set>
<set name="Entry5">
<str name="displayName">
<val>Dates</val>
</str>
<str name="regEx" translate="no">
<val>(\b)(((\d{1,2}(\||\-|\.|\s|\\|/|_)){2}\d{2}(\d{2})?)|(\d{1,2}(st|nd|rd|th)?(\||\-|\.|\s|\\|/|_)(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec|january|february|march|april|june|july|august|september|october|november|december)((\||\-|\.|\s|\\|/|_|,)(\||\-|\.|\s|\\|/|_)?\d{2}(\d{2})?)?)|((jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec|january|february|march|april|june|july|august|september|october|november|december)(\||\-|\.|\s|\\|/|_)\d{1,2}(st|nd|rd|th)?((\||\-|\.|\s|\\|/|_|,)(\||\-|\.|\s|\\|/|_)?\d{2}(\d{2})?)?)|(\d{2}(\d{2})?((\||\-|\.|\s|\\|/|_)\d{1,2}){2}))(\b)</val>
</str>
<str name="examples">
<val>Numerical day/month or month/day, followed by year:
01-01-08 12/31/08 31.12.2008

Numerical year, followed by day/month or month/day:
08-01-01 08/12/31 2008-12-31

Month in words:
1st January 2008 1 Jan 08 January 1st 2008 Jan 1 08</val>
</str>
</set>
<set name="Entry6">
<str name="displayName">
<val>my Phone Numbers</val>
</str>
<str name="regEx" translate="no">
<val>(\b\s?)((\+?\d{1}(-|\s|\.|_))((\(\d{3}\)|\d{3})(-|\s|\.|_)?)|((\(\d{3}\)|\d{3})(-|\s|\.|_)?))?(\d{3}(-|\s|\.|_)\d{4})(\b)</val>
</str>
<str name="examples">
<val>This pattern will search for 7-digit phone numbers separated by punctuation marks, as well as leading area codes.

For example:
555-1212
212.555.1212
1 (212) 555-1212</val>
</str>
</set>
</asf>

 

 

This topic has been closed for replies.
Correct answer Khanh38730918z3e8

placing the file in this folder worked so i'll use it instead...

 

C:\Users\<name>\AppData\Roaming\Adobe\Acrobat\DC\Preferences\Redaction\ENU\SearchRedactPatterns.xml

1 reply

Khanh38730918z3e8AuthorCorrect answer
Participant
September 29, 2024

placing the file in this folder worked so i'll use it instead...

 

C:\Users\<name>\AppData\Roaming\Adobe\Acrobat\DC\Preferences\Redaction\ENU\SearchRedactPatterns.xml

Legend
October 31, 2024

Thanks for sharing your findings here in the community, @Khanh38730918z3e8!
Surely, this may help some with similar requirements. 

 

~Tariq