Rule Engine MATCHES

Hello

I am writing a rule in Rule Engine to differentiate between cells that contain numbers and those that don’t.

The numbers will also contain units which will later be split with a regex split node, but for now I just need to state the difference between them.

Example of the column values:

2.5L
Forbidden
5Kg
Not Permitted
0.5L

I would like to get a result like this:

Value Port
2.5L top
Forbidden bottom
5Kg top
Not Permitted bottom
0.5L top

I am trying to use the MATCHES function in Rule Engine but no matter what I try the row gets assigned “bottom”

Could anyone please suggest the regular expressions to sort them?

Thanks
Heather

1 Like

Hi @Heather,

Try this:

$Value$ MATCHES /.*[\\d].*/ => "top"
TRUE => "bottom" 

:blush:

7 Likes

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