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 / Suggest how to use fun...
Power Apps
Answered

Suggest how to use function MATCH to extract particular information from text please?

(0) ShareShare
ReportReport
Posted on by

Dear Esteemed Forum'ers:

Can someone suggest a method to extract the facility name and person's name from the following text please?

 

[ Book Order (Name of facility (not for profit), First_Name Last_Name) ]

 

The text is between the square brackets.  The facility name to be extracted is shown in red. The person's name to be extracted is shown in blue and does not include the last parenthesis.

I would like to use the MATCH function to accomplish this. I have already implemented other methods not using MATCH but not had success with MATCH.

Thank you for considering this.

Chris

Categories:
  • WarrenBelz Profile Picture
    156,748 Most Valuable Professional on at

    HI @ChrisChong ,

    The Search function will do this, however is not a delegable filter.

    How big is your data set?

  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @ChrisChong ,

    Do you want to get the red part and the blue part text from this kind of data: [ Book Order (Name of facility (not for profit), First_Name Last_Name) ]?

    If so, I suggest you try Split function.

    I use Lable1.Text to represent the text of " [ Book Order (Name of facility (not for profit), First_Name Last_Name) ]".

    To get the red part:

    Concatenate(Last(FirstN(Split(First(Split(Label1.Text,",")).Result,"("),2)).Result,"(",Last(Split(First(Split(Label1.Text,",")).Result,"(")).Result)

    The result is : Name of facility (not for profit)

    To get the blue part:

    First(Split(Last(Split(Label1.Text,",")).Result,")")).Result

    The result is :First_Name Last_Name

     

     

    Best regerds,

  • ChrisChong Profile Picture
    on at

    I appreciate your solution--it will work. I use something similar which also works. I was hoping for a solution that employs the MATCH function. My reason is that I believe (perhaps in error) that MATCH is more efficient and elegant.

    Chris

     

  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @ChrisChong ,

    Oh, I know your meaning.

    Since the text " [ Book Order (Name of facility (not for profit), First_Name Last_Name) ]" doesn't have any other characters except "(",")" and ",", so I could only match the string based on these three characters.

    I've made a similar test:

    1)set the label's Text: 

    " [ Book Order (Name of facility (not for profit), First_Name Last_Name) ]"

    2)get red part:

    Substitute(Substitute(Match(Label1.Text,"\(.+\),").FullMatch,"(","",1),",","")
    //match string like this: (....),

    //using Match(Label1.Text,"\(.+\),").FullMatch could only get this result: (Name of facility (not for profit), 

    I also need to cut the first "(" and ",". So I use Substitute to modify the result.

     

    3)get blue part:

    Substitute(Substitute(Match(Label1.Text,",.+\)").FullMatch,",",""),")","")
    //match string like this: ,...)

    //using Match(Label1.Text,",.+\)").FullMatch could only get this result: , First_Name Last_Name),

    I also need to cut the first "," and ")". So I use Substitute to modify the result.

     

    Here are docs about these two functions for your reference:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-ismatch

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-replace-substitute

     

     

    Best regards,

     

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 339 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 289

#3
Mohsin Ali Profile Picture

Mohsin Ali 228

Last 30 days Overall leaderboard