Free non-production regex connector for PowerAutomate Flows

By | June 22, 2020

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:

https://github.com/ashlega/ItAintBoring.PowerPlatformWithCode/blob/master/CDSSolutions/Connectors_managed.zip

Once you’ve installed the connector, you should be able to use ItAintBoring Regex action in your flows:

image

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

 

image

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

  1. DC

    This is exactly what I’m looking for and looks like it would fit my scenario but I cannot figure out how to install the connector.

    It’s downloaded as a ZIP file but Power Automate is expecting a JSON – am I missing something? Is this no longer working with PA? Is there installation instructions somewhere?

    Reply
  2. DC

    I figured out that the required JSON in a subfolder of the zipfile linked.

    In trying to migrate from Plumsail Actions’ regex action, it took me ages to figure out what was going on, but eventually I figured out that the Plumsail regex ‘(?<!\d)\d{5}(?!\d)' needs to be expressed as '/((?<!\d)\d{5}(?!\d))/'to work with your connector.

    There is also some weird null handling (a null returned is not actually null, it's actually a zero length string) so yeah that's yet another frustrating null iteration with PA.

    Reply

Leave a Reply

Your email address will not be published.