web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Suggested Answer

Kind of regex

(0) ShareShare
ReportReport
Posted on by 10

Hi,

 

I would like to create a flow that checks if there is a string in the subject of an e-mail message. That string always looks like this: Mnnnn nnnn, and n are digits from 0 to 9, e.g. M1234 9876.
I can get this done in Regex, and I see examples with a regex function in Office scripts, but I would prefer to do it entirely in PowerAutomate.

 

Is that possible?

Categories:
I have the same question (0)
  • grantjenkins Profile Picture
    11,063 Moderator on at

    If it was me, I'd definitely be using an Office script. I have an Excel file setup centrally in our company (Power Platform Portal - SharePoint site) and everyone has read access to it so they can leverage it in their flows. It contains quite a few scripts that are useful and tightly controlled so as not to affect flows that use it.

     

    There are third-party connectors out there that allow you to do regex within the flow.

     

    I'm sure you could do it using the standard connectors (without regex) but likely some ugly hacky expressions to get what you want. I can see what I can come up with.

  • Suggested answer
    Matkje Profile Picture
    22 on at
    Hey
     
    You can do this by using Parse Text function in Power Automate. That allows RegEx as input. Explained in below video.
     
     
    Best regards
    Mathias Kjeldsen
     
    ---
    If this has helped solve your problem, please mark it as an helpful answer. 

    Connect with me on social platforms by using the links below.
    YouTube: https://www.youtube.com/@matkjeldsen 
    LinkedIn: https://www.linkedin.com/in/mathiaskjeldsen/

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 442

#2
Vish WR Profile Picture

Vish WR 328

#3
David_MA Profile Picture

David_MA 268 Super User 2026 Season 1

Last 30 days Overall leaderboard