Does a dot have to be escaped in a character class (square brackets) of a regular expression?

In a character class (square brackets) any character except ^, -, ] or \ is a literal.

This website is a brilliant reference and has lots of info on the nuances of different regex flavours.
http://www.regular-expressions.info/refcharclass.html

Leave a Comment