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
Power Apps Staff GregLi
Power Apps 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
Power Apps Staff AndyPennell
Power Apps 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.

Power Apps Staff GregLi
Power Apps 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 8

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
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (10,035)