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 to keep only the n...
Power Automate
Answered

How to keep only the numbers in a text string variable?

(0) ShareShare
ReportReport
Posted on by 28

How do I keep only the numbers in a text string variable?

 

I have something like "123abc" and I just want to keep the numbers. (And input that into a different web page.)

 

I can't use "Convert Text To Number" since it also has text and throws an error. Any ideas?

 

 

I have the same question (0)
  • Verified answer
    Gidi Profile Picture
    601 on at

    Hi Jesse,

     please have a look at the “Parse text” action. There you can use regular expression to get the result:

     

    1. Add the "Parse text" action to your flow.

    2. In the "Text" field, enter the string from which you want to extract numbers.

    3. Enable the "Is regular expression" option.

    4. In the "Pattern" field, enter the regular expression pattern you want to use, such as `(\d+)` to extract numbers.

    5. Specify the output variable where you want to store the extracted numbers.

    Once you configure the "Parse text" action with the appropriate regular expression pattern, it will extract the numbers from the input string and store them in the specified output variable.

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 276 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard