Showing results for 
Search instead for 
Did you mean: 
Not applicable

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

Hi @Anonymous 


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

Not applicable



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



it would be helpful to have regex action  , 

Helpful resources

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.


Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (7,202)