Skip to main content
The RegExp formatter rewrites a value using a regular expression: it finds what the pattern matches and replaces it with your replacement. Use it to strip prefixes, remove separators, or pull one part out of a longer value.

Options

Examples

This formatter replaces rather than extracts. To keep only part of a value, write a pattern that matches the whole value, put the part you want in a capture group, and use $1 as the replacement — as in the third row above.

When it fails

If the pattern or the flags are not valid, the field is cleared and the formatter reports RegEx Formatter: Invalid pattern or flags specified, which sends the document to human review. A pattern that simply does not match anything is not an error — the value is passed through unchanged. An empty value is left empty.
This is the formatter, which rewrites values. To check a value against a pattern without changing it, use the RegExp validator instead.