I want to match those URLs
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.