Jump to content

Javascript Regex


Ninjakreborn

Recommended Posts

The format I need to check for is this:

http://media.mlspin.com/photo.aspx?mls=70741856&n=1

The code I am using right now is...

	    $(document).ready(function(){

	        $(".yoxview").yoxview({allowedUrls: /\/photo.aspx\?mls=(?:\d+)&n=(?:\d+)$/i});
	    });

It's not seeming to work. Any advice is appreciated. I am decent at regular expressions, but still getting the hang of it.

Link to comment
https://forums.phpfreaks.com/topic/245126-javascript-regex/
Share on other sites

I am not sure. There are no errors. All I know is the application I am trying to use only accepts URL's that end with the image extensions.  However, you can change the URL to support other URL's. That is what I am trying to do The way I can tell it's not working is by testing it after testing the regular expression, and it's not recognizing the URL because it's not been setup as allowed.

Link to comment
https://forums.phpfreaks.com/topic/245126-javascript-regex/#findComment-1259102
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.