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 text between t...
Power Automate
Answered

Extract text between two / symbols

(0) ShareShare
ReportReport
Posted on by 2

Hi All, 

 

I am trying to extract text from a certain position in a string. 

I need to get any text between the last two / symbols (eg 'extraction)

 

https://webaddress.com/extracttion/

 

Can anyone help?

 

Thank you!

Categories:
I have the same question (0)
  • KE_WSG Profile Picture
    2 on at

    forgive the spelling - i was in a rush!

  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @kajelliott ,

     

    Please try the expression:

    first(reverse(take(split(outputs('Compose'), '/'),sub(length(split(outputs('Compose'), '/')),1))))

    vjefferni_0-1706768822392.png

     

    Best regards,

  • Verified answer
    Manish Solanki Profile Picture
    15,169 Moderator on at

    Hi @kajelliott 

     

    Pls use the expression to extract the required text:

    ManishSolanki_0-1706768818482.png

    Below expression needs to bs added in the expression box as highlighted in the above screenshot:

    trim(join(take(reverse(split('https://webaddress.com/extracttion/','/')),2),''))

     

     

    Output:

    ManishSolanki_1-1706768895217.png

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

  • Verified answer
    Chriddle Profile Picture
    8,697 Super User 2026 Season 1 on at

    Althoughthere is already a good solution provided by @ManishSolanki (and I would go for it), I want to show another easy way:

    slice(
    	'https://webaddress.com/extracttion/',
    	add(nthINdexOf('https://webaddress.com/extracttion/', '/', -2), 1),
    	nthINdexOf('https://webaddress.com/extracttion/', '/', -1)
    )

    You can find the last positions in a string by using negative numbers as occurrence in nthIndexOf().

    nthIndexOf('<text>', '<searchText>', <occurrence>)

     

  • Manish Solanki Profile Picture
    15,169 Moderator on at

    Hi @Chriddle 

     

    Thanks for sharing. New learning for me 🙂

     

     

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

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 470

#2
Haque Profile Picture

Haque 411

#3
David_MA Profile Picture

David_MA 337 Super User 2026 Season 1

Last 30 days Overall leaderboard