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 Platform Community / Forums / Power Automate / Isolate substring with...
Power Automate
Answered

Isolate substring with unknown characters

(0) ShareShare
ReportReport
Posted on by 4

Hi Folks,

 

High Level on my Flow

I need to create a flow which monitors an email inbox for new emails with attachments, isolate a substring within the body content of the email and then save the attachment to a specific location dependant on the substring value within the body.

 

Most of this flow I am absolutely fine in creating, except one specific part..

 

Where I need help

The body content of the email could be entirely dynamic, in that it could never be the same wording, structure or length etc.

However, the body content will always have a substring which looks like the below example:

 

????/??

 

The ? characters will always be an integer value and the structure of the substring will always be -  4 integers followed by a '/' followed by 2 integers.

However the integer characters again could be entirely dynamic from one email to the next and therefore are effectively mystery integers.

 

Example

To give as much information as possible, the following example could be a full email body containing a version of the substring I'm trying to isolate:

 

"Please find attached document which relates to 0928/77. If you have any problems please let me know."

 

With the above email body, I don't care about anything other than isolating "0928/77" and storing that value into a variable which i can then use later on in the flow.

 

Any ideas or help would greatly be appreciated!

 

Many thanks,

Jordan

 

Categories:
I have the same question (0)
  • Verified answer
    DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @Creppz 

     

    There's no regex in Power Automate but if that is the only guaranteed / in the string you can use indexof and substring as follows:

    DamoBird365_0-1622310649450.png

    Output is :

     

    DamoBird365_1-1622310668449.png

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    Cheers,
    Damien


    P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 785

#2
Valantis Profile Picture

Valantis 669

#3
Haque Profile Picture

Haque 563

Last 30 days Overall leaderboard