I have the following regex (provided to me from another question I asked). How would I change this to make this work, as I was testing this I realized that there was something I overlooked.
var modulepattern = new RegExp(/^\/application\/modules\/[^\/]*\/models/i);
modulepattern.test("/application/modules/test/models"); //returns true as it should - this is perfect
modulepattern.test("/application/modules/test/models/test"); //should return false - but currently returns true (note the additional directory after the /models in the path
I need to know what to add to the regex pattern to make both examples produce the desired results.
Worth 500 points.