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:
/((\+\d{1,2}\s)?\(?\d{3}?\)?[\s.-]?\d{3}[\s.-]?\d{4})/
And the following value:
regex6471112233magic
It will produce this result:
6471112233
The source code for is available here:
https://github.com/ashlega/ItAintBoring.PowerPlatformWithCode
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).
2 thoughts on “Free non-production regex connector for PowerAutomate Flows”