I recently had trouble with some regex on the command-line, and
found that for matching a backslash, different numbers of
characters can be used. This number depends on the quoting used for
the regex (none, single quotes, double quotes).
I know through (my very limited) experience that you can't use the asterisk alone in a regex, but I still don't quite understand why. After all, it should match 'any or no characters'. To my mind, '*grep' should match:
While '.*grep' should match
...but not 'grep' because it seems like we are insisting upon a character in front of 'grep' with that dot.