5 Replies Latest reply on Jul 9, 2012 11:57 AM by George_Johnson

    redact - pattern

    drop box

      I want to define my own text patterns for redaction with Adobe Pro X (using Win 7). The text patterns option is found under Tools/Protection/Search and Remove Text.

       

      Following Web page has related pictures and a link but no help info:

      http://helpx.adobe.com/acrobat/kb/acrobat-9-search-redact-patterns.html

        • 1. Re: redact - pattern
          George_Johnson MVP & Adobe Community Professional

          Have you tried editing the SearchRedactPatterns.xml file, using the existing entries as a guide? What patterns would you like to add?

          • 2. Re: redact - pattern
            drop box Level 1

            I have found the file named SearchRedactPatterns.xml (thank you) and I just started trying to make sense the code defining text pattern. (I also need to get rights to modify this file - it's locked.)

             

            I want to add a pattern that fits a pair of numbers (latitude and longitude). The pattern is always a pair, comma and space separate the pair, second number preceeded by negative sign. There are two digits before the decimal point. The number of digits after the decimal points will change - so I guess I define more than one pattern - but even with a single, new pattern fitting the example below, I would have saved myself work and saved myself time.

             

            Example pattern:

             

            36.63, -82.551

            • 3. Re: redact - pattern
              George_Johnson MVP & Adobe Community Professional

              I haven't tried adding a new pattern yet, but it looks like you should be able to just create a single regular expression for that pattern. If you need more help, and I try it later today.

              • 4. Re: redact - pattern
                drop box Level 1

                I found a website that explains text searches usin regular expressions (RegEx) -

                http://www.Regular-Expressions.info/

                 

                Looks like the RegEx code at this "info" website is similar to the text pattern code in the Adobe xml file (SearchRedactPatterns.xml).

                 

                I need to match and redact a Lat. and Long. coordinate pair such as:

                36.63, -82.551               (fixed length)

                36.6nnn, -82.5nnnnn       (variable length)

                 

                I want to try my code (untested code - don't know if it is correct), first matching a fixed length pair, second matching variable-length :

                 

                <val>(\d\d.\d\d\,\ \-\d\d\.\d\d\d\)</val>

                <val>(\d\d\.\[0-9][0-9]{0,4}\,\ \-\d\d\.\[0-9][0-9]{0,6})</val>

                • 5. Re: redact - pattern
                  George_Johnson MVP & Adobe Community Professional

                  That second one should be:

                   

                  <val>(\d{2}\.\d{0,4}, \-\d{2}\.\d{0,6})</val>

                   

                  Go ahead and try it out.

                   

                  Edit: fixed mistake