What does \’.- mean in a Regular Expression

The character class is the entire expression [A-Z \'.-], meaning any of AZ, space, single quote, period, or hyphen. The \ is needed to protect the single quote, since it’s also being used as the string quote. This charclass must be repeated 2 to 20 times, and because of the leading ^ and trailing $ anchors that must be the entire content of the matching string.

Leave a Comment