Rule Engine MATCHES - use captured regex value as replacement

I have a column from legacy data with different date formats. I am using Rule Engine and specifying one rule for each pattern detected and converting entire column to a standard format.

Can the RHS have access to captured groups? e.g. $0 ?

$datev$ MATCHES β€œ([0-9]+)-/-/” => $0/$1/$3

For this purpose you can use

node.
The captured group will not work also but you can use original column to extract it.

3 Likes

For column expression Column Expressions – KNIME Hub, you can specify the element by subsetting [0], [1], etc.

column(β€œcolumn1”).match(/([0-9]{5})/)[0]

But Regex Find All is also nice:

Screen Shot 2022-03-18 at 11.17.43 AM

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.