JS isn't my usual language, but I'm venturing out to write a Chrome extension. This extension basically just injects a script on a page, so it behaves just like any other JS.
Anyway, the script finds specific URLs on a specific page, and changes them slightly. I'm using regex to find these URLs. I've got one working, but I need another, and I can't figure it out.
The first is this:
Also, my skills with regex are miserable, so if you know of any way to make this better, I'm all ears.
This matches URLs like this:
Now I'm trying to match URLs like this:
If you know how to modify the original regex so that it'll match the second kind of URL (but not the first), or some way to make them both better, please let me know.
Thanks for reading.