In a few of my previous posts, I used a custom connector which had a “regex” action implemented in it. In case that’s something you might try using in your flows as well, a non-production version (no up-time guarantee, no guarantee at all whatsoever. Feel free to use it, but you can’t hold me responsible) is now available as a CDS solution.
You just need to download the solution file from github:
Once you’ve installed the connector, you should be able to use ItAintBoring Regex action in your flows:
So, when given the following phone # pattern:
And the following value:
It will produce this result:
The source code for is available here:
Please note that this connector is using a php version of the API, and, basically, it’s utilizing preg_match function: https://www.php.net/manual/en/function.preg-match.php
It will either return null if there is no match, or it will return a value that corresponds to the first captured parenthesized subpattern (so, basically, whatever matches the expression started with the leftmost parenthesis).