rikyeah
rikyeah

Reputation: 2013

Power Automate Regex expression

I need a Power Automate expression to extract a substring from a string, based on the regex

AA-BBB-\d{1,6}

but apparently Power Automate doesn't offer a regex match/extract function via expressions. Is there an easy way, possibly a short custom expression?

Upvotes: 1

Views: 4613

Answers (2)

hts123
hts123

Reputation: 61

You can use a python script to add in the regex.

Step to add : Run Python Script

E.g. :

import re
p = re.compile("AA-BBB-\d{1,6}")
value="""%AttributeValue%"""
result = p.search(value).group()
print (result) 

Advanced : Module Folder Path : You have to link to the re library in your computer.

Hope it helps.

Upvotes: 0

Adil
Adil

Reputation: 231

You can use RegEx in Power Automate without using any custom connector using

Excel Run script action and create RegEx function in any Excel using office script typescript language. It's simple straightforward not much complex to do.

Full detailed implementation can be checked on this link.

[https://www.youtube.com/watch?v=S22719J_yXw]

Upvotes: 0

Related Questions