Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Extract only numbers from string

(0) ShareShare
ReportReport
Posted on by 178

Hi Guys,


I have a dynamic text input box.


I want to only extract numbers and remove everything else. Example letters, spaces, special characters etc.

Any help is greatly appreciated.


Thanks

  • timl Profile Picture
    timl 33,713 on at
    Re: Extract only numbers from string

    @christian12 

    Here's a Regex example that will also work

    Match(TextInput1.Text, "[0-9]+").FullMatch

     

    timl_0-1680683057804.png

     

  • Re: Extract only numbers from string

    Hi @christian12 ,

     

    This works for me too ->

    Trim(Concat(Split(TextInput1.Text,""),If(IsBlankOrError(Value(Value)),"",Value),""))

    swaminawale_0-1680666743706.png

     

  • Ami K Profile Picture
    Ami K 15,650 on at
    Re: Extract only numbers from string

    Either of these tend to work for me:

     

    Trim(Concat(Split(Label7.Text,""),If(IsBlankOrError(Value(Value)),"",Value),""))

     

    Concat(Filter(Split(Label7.Text,""),IsNumeric(Value)),Value)

     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,422

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,711

Leaderboard