Toni2708 Toni2708 - 1 year ago 111
Javascript Question

Easy RegExp doesnt match

I want to match those URLs


with a RegExp. I've tried
, but I only get two matches


It's probably very easy but I don't have a clue why this isn't working.

Thanks for your help!

Answer Source

This is a bit easier to follow in my opinion:


Although I'm unsure whether you need to simply match the url (true/false) or capture de-de or whatever precedes or follows the samples you provide.

confirm is wrapped into a non-capturing group because it's the only path component which may or may not be there.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download