RedactByRegEx
Searches the entire page and redacts all occurrences of the phrase that matches the RegEx expression.
Syntax
bool RedactByRegEx (string RegEx, string VariableBase)
Parameters
string RegExstring VariableBase
Parameters
- RegEx The expression to search for on the page. Smart parameters are supported.
- VariableBase A variable to create in the runtime DCO to track each redaction.
Returns
Always True.Level
Page Level.Details
This action searches the entire page and redacts all occurrences of the phrase that matches the RegEx expression. This action must be called at a field level, however the coordinates of the field will change during the operation and will remain on the last found occurrence of the found text, so it may be necessary to use a zoned but unused field for this action.The VariableBase parameter specifies a variable name to use as a history of redacted words. For each redaction, a variable of the form "VariableBasen", where n is an incrementing number, is created in the runtime DCO with the coordinates of the redacted word. For example, if the parameter was "Hello", the variables created would be named: "Hello1", "Hello2", "Hello3", etc. for each redaction. An example value of the variable: "TM000001,159,1085,242,1115".
- Example:
RedactByRegEx("[Hh]istory", "Location")This example will redact all areas on the page where the word "History" or "history" exists. The redactions will be tracked in the runtime DCO in a variable called Location0, Location1, etc.