RO CSVI

Replacement: regular expressions

In the Multi-replace rule of RO CSVI you can do a lot of transformations on the data, the most powerful one is probably the Find and Replace option that supports regular expressions.

Use-case: Replace a value if the original value contains a specific string

Let's say that the field being exported has a value of 58|75|98|175|344|. Only when this field contains 75 do you want to replace the field with another value. To achieve this, you are going to need 2 regular expressions:

  1. To replace the 75 with another value
  2. To remove the rest

In this screenshot you can see the two regular expressions and they do the following:

  1. In step 1 we find the value 75 and replace it with found. This uses the regular expression /(.*)(?<!\d)75(?!\d)(.*)/ 
  2. In step 2 we find everything but the word found and replace it with nothing. This uses the regular expression /^((?!found).)*$/
  3. Finally your value will be the word found.

Replacement: regular expressions