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

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])(Smiley Sad0-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.

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.

Re: IsMatch function not functioning correctly

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

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

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

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 132 members 4,495 guests
Please welcome our newest community members: