globs vs regexps
Posted Aug 5, 2004 11:34 UTC (Thu) by
Lasse99 (guest, #1899)
In reply to:
globs vs regexps by rfunk
Parent article:
Bash 3.0 released
Actually, the single-star glob '*' is equivalent to the rather complicated
regular expression '^[^.].*$' or even '^[^./][^/]$'.
On the other hand, the simple regular expression '.*' must be expressed by
a set of two filename globs, namely ( '.*' '*' ).
So, it is debatable which syntax is more complicated...
(
Log in to post comments)