cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

IsMatch function not functioning correctly

Currently building a powerapp where users need to input a url to a document hosted in SharePoint. I need to validate that is it a URL the user is inputting, however, I'm having some trouble and found the IsMatch function doesn't appear to be working correctly.

 

I'm using the example from the microsoft reference page here: https://powerapps.microsoft.com/en-us/tutorials/function-ismatch/

According to it the following expression should show as true:

IsMatch( "http://microsoft.com", "(ht|f)tp(s?):\/\/[0-9a-zA-Z]([-.\w][0-9a-zA-Z])(:(0-9))(\/?)([a-zA-Z0-9-.\?\,\'\/\+&%\$#_]*)?" )

 

However, when i apply this as the Text property of a label, it resolves as false (screenshot below).

powerapps-ismatchError.PNG

 

Am I missing something here or is the function broken? Cheers

1 ACCEPTED SOLUTION

Accepted Solutions
PowerApps Staff GregLi
PowerApps Staff

Re: IsMatch function not functioning correctly

The documentaiton has been corrected.  Our documentaiton is written in Markdown which interprets * as a special character and was effectively eating those characters in what you read.  They have now been properly escaped and the URL validation example is working again.

View solution in original post

4 REPLIES 4
PowerApps Staff AndyPennell
PowerApps Staff

Re: IsMatch function not functioning correctly

Sorry, there is a typo in the documentation so the regex got mangled. Those that can read regex (ie not me!) are fixing it, thanks for the report.

PowerApps Staff GregLi
PowerApps Staff

Re: IsMatch function not functioning correctly

The documentaiton has been corrected.  Our documentaiton is written in Markdown which interprets * as a special character and was effectively eating those characters in what you read.  They have now been properly escaped and the URL validation example is working again.

View solution in original post

Anonymous
Not applicable

Re: IsMatch function not functioning correctly

Beautiful, thanks guys! Just tested and working correctly now. 🙂

rodieremix
Level: Powered On

Re: IsMatch function not functioning correctly

It looks like this is still an issue. I copied the info straight off the page and it is showing as false.

 

ismatchss2.pngismatchss1.png

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Kudoed Authors
Users Online
Currently online: 268 members 5,538 guests
Please welcome our newest community members: