cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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. 🙂

Highlighted
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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,136)