Using regex in a microflow

9
I want to use a regex in a microflow; how can I achieve this, without defining a validation rule on an attribute of an entity? I believe there is an notation for using a regex in eg. a check. I prefer not to create a Java action for it; like the answer on basically the same question here. Thanks!
asked
2 answers
30

How about the string function isMatch?

You can call this function in a microflow and check if the string is matching your regular expression:

isMatch($yourvariable, '^([0-9]+)$')

I use it all the time, works like charm.

answered
4

all you need here is to create a constant and set its value to your regex, then you can use isMatch($yourvariable, constant value) into your MF

answered