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 Apps / Getting Text value fro...
Power Apps
Answered

Getting Text value from match function

(0) ShareShare
ReportReport
Posted on by 11

Hello,

New to power apps (mainly a VBA hobbyist) - so apologies for posting what I'm sure is bound to be a very basic question.

 

I'm using  Text Recognizer and need to lift a specific code from all the text in the picture  that matches a mask of:

"[A-z]/d/d/d/d[A-z][A-z]"

 

I want to both display that number in a label and then do further comparisons with it later in the app (so being able to both display and set as a variable for further use).

 

I've set the "on change" property of the TextRecognizer to put the result in a Variable. I then have another (temporary) label that concatenates all the OCR data into a Text a single string.

 

In a second label I'm experimenting with the Match function to try and lift the matching code from the text in Label1.

Match(Label1.Text,"[A-z]/d/d/d/d[A-z][A-z]")

 

I get an error. It think it's because Label2 wants a text value, and Match is returning a Record value. 

I think the value I want is in the "FullMatch" column of that Record.

But I have no idea how to access it.

 

 

Categories:
I have the same question (0)
  • Verified answer
    JEA_123 Profile Picture
    11 on at

    Never mind!

    It was as simple as

    Match(Label1.Text,"[A-z]/d/d/d/d[A-z][A-z]").FullMatch

  • slima1 Profile Picture
    69 on at

    Set the Text property of "ResultLabel" to:

    If(IsMatch(Label1.Text, "[A-Z]/d/d/d/d[A-Z][A-Z]"), Match(Label1.Text, "[A-Z]/d/d/d/d[A-Z][A-Z]").FullMatch, "No Match Found")

  • JEA_123 Profile Picture
    11 on at

    Thanks for your help, but that doesn't work in my application.

    I think the IsMatch is always returning False because there is more text than just the code I'm looking to extract in Label1.

     

    It has inspired me to find another way to return "Not Found", as that would show the user that the app is working but hasn't found the code.

     

    This works for me:

    If( IsBlank(Match(Label1.Text,"[A-z]\d\d\d\d[A-z][A-z]").FullMatch) , "Not Found", Match(Label1.Text,"[A-z]\d\d\d\d[A-z][A-z]").FullMatch)

     

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 839

#2
Valantis Profile Picture

Valantis 533

#3
Haque Profile Picture

Haque 412

Last 30 days Overall leaderboard