web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Suggest how to use fun...
Power Apps
Unanswered

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:
I have the same question (0)
  • WarrenBelz Profile Picture
    152,845 Most Valuable Professional on at
    Re: Suggest how to use function MATCH to extract particular information from text please?

    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
    on at
    Re: Suggest how to use function MATCH to extract particular information from text please?

    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
    Re: Suggest how to use function MATCH to extract particular information from text please?

    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
    on at
    Re: Suggest how to use function MATCH to extract particular information from text please?

    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard