Replace via regular expression processor

Anthony Pépin Updated by Anthony Pépin

The Replace via regular expression processor allows you to replace or remove any part of a text, number, or combination of both.

Setting the processor

To set the parameters of the Replace via regular expression processor, follow the indications from the table below.

Label

Description

Mandatory

Default value

Field

Field which contains the values to replace or remove.

Yes

 

All fields

If selected, all fields from the dataset will be processed with the Replace via Regexp processor

No

 

Regular expression

Regular expression to determine which part of the values will be replaced or removed. See https://en.wikipedia.org/wiki/Regular_expression for more details on how to write a regular expressions.

It is also possible to test regular expressions with an online debugger tool like Regex101.

Yes

 

New value

If the field value determined with the regular expression is replaced, write the new value that must replace the old one. If the field value determined with the regular expression is removed, let this parameter empty.

No

 

Case insensitive regular expression

If selected, the regular expressions are case-insensitive

No

False

Multiline regular expression

If selected, each new line marks the beginning of another line. More information about the multiline option in the Python documentation.

No

False

'.' character match new lines

If selected, the '.' character also encompasses new lines. More information about the '.' character in the Python documentation.

No

False

Example

In order to keep only a part of a number, the processor Replace via Regexp should be used. For example, it is possible to keep only the area code from a French zip code (e.g from 44100 [Nantes], to keep only 44 [Loire-Atlantique]).

Replace Regexp

How did we do?

Replace text processor

Retrieve Administrative Divisions processor

Contact

Powered by HelpDocs (opens in a new tab)