Dynamic regular expression

Hi Team,

How do I pass a dynamic variable in regular expression function “matches”.
Ex: matches(variable,column_name).

In the above statement I want to keep on passing a regular expression dynamically in variable. How shall I do that?

Thanks

Hello Kalicharan,

You can use the Dynamic Expression Assigner Step for a dynamic regex. Please, see Tutorial 06.07 for an example of how to use the Step.

Also, keep in mind that matches() requires a Boolean column. So you would have to use ToString before matches for the expression to work - ‘toString(matches())’.

Regards,
Maksim

1 Like