Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

Check E-Mail subject with RegEx (check two mails)



I need a flow that check the E-Mail subject for a specific substring like this "Nr. 123456789". I have this RegEx:




In my case it will be have always two mails with the same number (Nr. 123456789) but not the same subject-string.

But i can't use RegEx on MS Flow? Is there another way? The Flow dont must work with trigger like "incomming mail", it can be scheduled flow or a button flow


The second problem that i have is, that i must check the second mail with the same number. Which way is better to solved this problem? Trigger the flow by every incoming mail, or check every 5min all mails to find the two mails with the same number...


I hope someone can help me at least for the RegEx


example for the subject:

Mail 1 subject = "Lorem ipsum Nr. 100448899 dolor sit amet"

Mail 2 subject = "At vero eos et accusam Nr. 100448899 no sea"


Super User
Super User

Re: Check E-Mail subject with RegEx (check two mails)

Hi @boegli 


I answered a similar question a few weeks ago where were trying to isolate a particular string pattern within the bod of the email. You could follow something similar to get the same from the Subject:


Basically what we did was get the index of a specific character patter e.g.  "Nr. " and then slowly reduce the string until we'd isolated the exact text that we wanted.


Let me know if you need any more help with this

Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!
If you liked my response, please consider giving it a thumbs up. THANKS!

Proud to be a Flownaut!

Community Leader: Black Country PowerApps & Flow User Group

Level: Powered On

Re: Check E-Mail subject with RegEx (check two mails)



But that will not help me to find the second Mail, and i dont want to extract i will match, or did i understand something wrong in your post?


Thx for the help



Helpful resources


New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!


Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!


Microsoft Learn

Learn how to build the business apps that you need.


Power Platform World Tour

Find out where you can attend!


Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,733)