The following expressions do not match: /[.]*/ and /.*/ . Why is this and how do they differ from each other? What is the interaction between [] and special characters in regular expressions?
/[.]*/
/.*/
[]
Thanks.
The point . usually a wildcard matching any character. However, in the character class ( [] ), it is considered as a literal and corresponds only to a point.
.
.*
[.]*