You're confusing regular expressions with what UNIX calls "regular expressions" which are overcomplicated bullshit that makes a simple and intuitive mathematical concept into something with nonsensical rules and special cases that takes a "guru" to understand. If you don't think grep and sh are bad enough, look at PCRE. They're not Perl compatible and not regular expressions.
https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions
Of course this won't work if you have files with names like
".x", in which case you have to type "rm -rf /tmp/.[^.]*", I
THINK. You see there's this problem in unix: there are
REGULAR EXPRESSIONS, which are one thing, and then there are
REGULAR EXPRESSIONS, which are a different thing, and I
sometimes get them confused for some reason, so I'm not sure
whether "/tmp/.[^.]*" is a regular expression or a regular
expression. They're really very different in appearance,
which is good because they have incompatible semantics.
Pop quiz: identify the types of the following patterns:
(a) "a*"
(b) "a*"
(answers: (a) is a regular expression, but (b) is not - it's
a regular expression).
Note the difference in spelling: the patterns used by the
shell are called "regular expressions", whereas the patterns
used by everything else are called "regular expressions."
You should never get them confused. You see regular
expressions are used for matching in the shell and are
documented in the section "REGULAR EXPRESSIONS", whereas
regular expressions are used for match, a very different
task, in grep(1), and are documented in the section on
"REGULAR EXPRESSIONS". The former look like strings, but
have special wildcard characters like "?", "*", and "[]",
whereas the latter also look like strings but have special
wildcard characters which look like "?", "*", and "[]". Be
sure to notice the differences in appearance because they
have different semantics. For example, the regular
expression "[a-z]*" matches all strings consisting of
lower-case letters, whereas the regular expression "[a-z]*"
matches all files begining with a lower-case letter.
I hope this had made everything clear to everyone.