BASICS
Escaping
A backslash tells the engine to treat the next character as a literal.
A handful of characters have a special job in a pattern. The dot is one: it means "any character" instead of a literal dot. These special characters are called metacharacters. So 3.14 does not mean the text "3.14" - the dot matches anything, so it also matches "3414" or "3x14".
To turn off that special job and match the character itself, put a backslash in front of it. The backslash says treat the next character literally. So 3\.14 matches only a real dot, giving you the exact text "3.14".
The metacharacters that need escaping when you want them literally: . * + ? ^ $ ( ) [ ] { } | \. When in doubt, escaping a punctuation character is always safe.
Match the exact text 3.14 - and nothing that merely looks like it.
pi is 3.14 roughly
the code 3414 is not pi
3x14 is not pi either
Match the exact domain www.site.com. Both dots must be real dots, not any-character.
go to www.site.com today
wwwxsitexcom is not it
visit example.org instead
Match the exact price $5.00. Both the dollar sign and the dot are metacharacters here, so escape them.
it costs $5.00 total
5500 cents is not it
price is $5x00 maybe
the total $500 differs