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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Isolate substring with...
Power Automate
Unanswered

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
    Re: Isolate substring with unknown characters

    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 497 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 477 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 242

Last 30 days Overall leaderboard