I'm having the hardest time with javascript regex, can't figure out how to match my url:
http://localhost:11111/#!/quote/18283
and
http://www.myurl.com/#!/quote/23834
with the same regex.
I just don't understand the regex rules that well.
I'm having the hardest time with javascript regex, can't figure out how to match my url:
http://localhost:11111/#!/quote/18283
and
http://www.myurl.com/#!/quote/23834
with the same regex.
I just don't understand the regex rules that well.
http://[\w\d\.:]+/#!/quote/\d{5}
- but obviously that is without any other context.
I don't know what your negative cases are. Which parts of the URLs are important, etc, etc.
One hint I can add is, if you are only looking to match a specific domain.com with localhost you can use alternation (either/or) with the pipe | symbol like (this is just for one portion of the regex:
((www\.)?myurl\.com|localhost:\d+)