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 Automate
Unanswered

Extract Strings

(0) ShareShare
ReportReport
Posted on by 2

Currently Im using powerautomate and  I want to extract 'PUN' from follwing string.

how do I extract data with function of power automate..

 

WH_GGN-PUN-SER-AFS-

the format is ooo-ooo-ooo-ooo-

 

Categories:
I have the same question (0)
  • Ellis Karim Profile Picture
    12,122 Super User 2026 Season 1 on at

    An expression using the split() function can extract the text. We can split at the '-' character.

    2021-11-17_12-10-36.png

     

    The split() function returns an array of values:

    2021-11-17_12-08-34.png

     We want "PUN" which is item 1 - based on the format  xxxx-XXXX-xxx-... Numbering starts at 0 for array items:

    2021-11-17_12-03-17.png

    Here is an example flow:

    2021-11-17_11-59-53.png

    The following expression using the slit() function will extract the second block of text:

    split(outputs('Compose'),'-')[1]

     


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

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

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 442

#2
Vish WR Profile Picture

Vish WR 328

#3
David_MA Profile Picture

David_MA 268 Super User 2026 Season 1

Last 30 days Overall leaderboard