RegEx
Similar to the Dictionary and Mapping Rules, the RegEx Replacement Rule can be applied to any type of extracted data, and is used to match Regular Expressions to the extracted data. The matched text can then be replaced with the predefined replacement text This is especially useful when correcting the extracted data to what is expected.
![](../../../.gitbook/assets/image (140).png)
The example below illustrated how a RegEx pattern can be used to remove any whitespace characters from the extracted data. The pattern simply searches for any whitespace character, and replaces it with a blank value (no characters).
![](../../../.gitbook/assets/image (153).png)
In the next example below, a RegEx pattern is shown to look for "Word" preceded and followed by at least one whitespace character. The value that will replace the match, will be "Word" with no whitespace characters. In essence, this RegEx replacement was used to remove the whitespace characters from the extracted value for the field.
![](../../../.gitbook/assets/image (132).png)
To add another Regular Expression to the Regular Expression Mapping Dictionary, click on "Click here to add a new row".
![](../../../.gitbook/assets/image (148).png)