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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Extract string between...
Power Automate
Unanswered

Extract string between 2 strings

(0) ShareShare
ReportReport
Posted on by 2

Hi,

 

I am having some issues trying to figure this out:

When converting an email to HTLM, then removing the empty lines from the array I get something like this:

Note this is only a sample with the relevant information:

--------------------------------------------------------------------------------------------------------

"Nom",
"Doe",
"Prénom",
"John",

"Fonction",

--------------------------------------------------------------------------------------------------------

 

The value I am interested is "Doe" and "John", however when I try the "starts with" function I get this output:

 

SmittAuthy_1-1642365411907.png

 

So my question is: how can I get "Doe" instead of "Nom"? Can I select the string between "Nom" and "Prénom" to get that?

 

Thank you for your help !

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @SmittAuthy 

     

    image.png

     

    Above you can see I have added the expression with index which is one and it should return Doe. The index starts from zero onwards.

     

    So if you want Doe and John then you need to use the below expression

     

    outputs('Compose')[1]

     

    outputs('Compose')[3]

     

    Thanks

  • SmittAuthy Profile Picture
    2 on at

    Thank you @abm for your help!

     

    I tried using the "outputs('Compose')" expression, however the emails received have the same layout, but sometimes have text before the information that I want to extract.

     

    So the "outputs('Compose')" expression isn't working all the time.

    -

    My thinking was: maybe there is a way to get the "Nom" line number and extract text from the next line? Something like n+1?

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @SmittAuthy 

     

    I have given the answer based on your original query. Looks like you don't have consistent format of email body.

     

    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
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard