Ninjakreborn Posted August 18, 2011 Share Posted August 18, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/245126-javascript-regex/ Share on other sites More sharing options...
requinix Posted August 18, 2011 Share Posted August 18, 2011 It's not seeming to work. Which means what? Errors? Wrong behavior? Quote Link to comment https://forums.phpfreaks.com/topic/245126-javascript-regex/#findComment-1259091 Share on other sites More sharing options...
Ninjakreborn Posted August 18, 2011 Author Share Posted August 18, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/245126-javascript-regex/#findComment-1259102 Share on other sites More sharing options...
requinix Posted August 18, 2011 Share Posted August 18, 2011 What was the code that worked with just image extensions? Quote Link to comment https://forums.phpfreaks.com/topic/245126-javascript-regex/#findComment-1259148 Share on other sites More sharing options...
Ninjakreborn Posted August 19, 2011 Author Share Posted August 19, 2011 I did not create the image extension code. That is what is uses by default (Voxview). It automatically uses the image extension. That's what the built in default is. Quote Link to comment https://forums.phpfreaks.com/topic/245126-javascript-regex/#findComment-1259393 Share on other sites More sharing options...
requinix Posted August 19, 2011 Share Posted August 19, 2011 I don't see anything wrong with it. Are you sure you have the URL exactly right? Quote Link to comment https://forums.phpfreaks.com/topic/245126-javascript-regex/#findComment-1259468 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.