I stumbled on this regex recently: \d{2}[,-.]\d{2}. The intention is clear enough: match two sets of two digits separated by a comma, a dash, or a period. Of course, it shouldn’t work. Dashes in character classes are special because they’re used for ranges (like [a-z] to match lower-case ASCII letters). If you want - in a character class you put it at the beginning, or the end, never the middle. S
![The regex [,-.]](https://cdn-ak-scissors.b.st-hatena.com/image/square/35b4c7818be85249d8df43989c3d5f3748c37c08/height=288;version=1;width=512/https%3A%2F%2Fpboyd.io%2Fposts%2Fcomma-dash-dot%2Fcode.png)