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 / How can I extract a nu...
Power Automate
Unanswered

How can I extract a number in between two different characters in power automate?

(0) ShareShare
ReportReport
Posted on by 12

 

Hi All, 

 

I am trying to use power automate to extract the numbers underlined below. I am lost on how to do so. As you can see the number will always be in between a dash and an underscore and the number could be either 3, 4, or 5 digits. Also sometimes there is another iteration of text in between the dash and underscore like in the project yellow document. I think I need to use Regular Expressions, but I am completely lost. 

 

Thank you in advance,

 

Marcus 

 

Mdemarici123_0-1640025370496.png

 

 

Categories:
I have the same question (0)
  • ScottShearer Profile Picture
    25,290 Most Valuable Professional on at

    @Mdemarici123 

    You can use a split() action if all of the following are true:

    1. There is always a dash preceding the number
    2. There is always an underscore after the number
    3. There will never be more than one dash or there will always be the same number of dashes
    4. There will never be more than one underscore or there will always be the same number of dashes

    In other words, there needs to be a pattern.

    If all of the above are true, see my example below, let me know and I will provide an example.

     

     

     

  • Mdemarici123 Profile Picture
    12 on at

    Hi @ScottShearer  unfortunately there will not be a constant pattern, the only difference will be the situation in the above picture in "project yellow" I was curious to see if there is a way to tell flow to get a number and only a number that is in between the dash and the underscore. 

  • VictorIvanidze Profile Picture
    13,079 on at

    Hi @Mdemarici123, than you have to use something like this:

    https://powerusers.microsoft.com/t5/Building-Flows/How-to-know-if-an-variable-is-numeric/td-p/565181

  • ScottShearer Profile Picture
    25,290 Most Valuable Professional on at

    @Mdemarici123 

    See my example below and give it a try.  Please let me know if this works for you.

    image.pngimage.png

     

     

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 308

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 226 Most Valuable Professional

Last 30 days Overall leaderboard