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 / 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,985 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,985 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

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!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 557

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 264 Super User 2026 Season 1

Last 30 days Overall leaderboard