You write a regex. You test it against two or three sample strings. It matches perfectly. You ship it.

Three days later, someone opens a bug report titled "validation is broken" and attaches a screenshot that makes no sense to you, because the exact same pattern worked fine when you tried it.

If this has happened to you, you're not bad at regex....