In a regular expression, which characters need escaping?
I know there is the
-E flag which treats the "search term" as a regular expression. However, it seems that even without that,
grep is treating some characters specially.
For example, if I run:
grep "$var" *
Then it lists every line of the file (I assume it's using
$ as the end-of-line regex). The period also seems to look for any character under certain circumstances.
So what are the special characters I need to be wary of when using