Quote:
Originally Posted by
sudon't
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'.
Zero or more
what, is the question. * is a modifier that changes the character before it. You may be used to globs, where * exists by itself and needs no specifier in front of it because it always matches everything. Regexes are not that.
. is a special character that means "anything".
"A*" on the other hand would match "", "A", "AA", "AAAAAAAAAA" and so forth.
"[0-9]*" would match "0123", etc.