i-hate-regex
i-hate-regex copied to clipboard
Aren't the `\b` in the UUID regex superfluous?
I'm not convinced the \b
in the UUID regex serve any purpose. Why are we trying to match word boundaries here?
^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$
(I tested the regex without the \b
and the same strings match or don't match)
@alex-hofmann do you remember why you added those?
@guillaumealgis apologies for seeing this [not quite] a year since you asked. There's no reason for them, that I can remember, and with fresh eyes I would not include them.
It looks like the \b
's are still out there, so one of us can likely PR an edit
@alex-hofmann no worries βΊοΈ
I won't bother with a PR, the repo hasn't seen activity since sept 2021 :)