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
Highlighted
Power Apps
Power Apps

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
Highlighted
Power Apps
Power Apps

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.

Highlighted
Power Apps
Power Apps

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

Highlighted
Anonymous
Not applicable

Re: IsMatch function not functioning correctly

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

Highlighted
Advocate III
Advocate III

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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,200)