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.
is supposed to return "oo" since all implementations are supposed to use Perl-style regex. However, this returns "o" on my Fedora 20 box. I tried several browsers: Chromium, Firefox, Konqueror, rekonq, QtWeb, Arora and QupZilla, all with the same result.