|
A note from an astute reader points out that although the * is used in both "file globbing" and regular expressions, the syntax used for each is actually quite different.
David Thompson writes:
----------------------
Hi Peter,
You are incorrect in your recent Mac article where you
compared shell globbing and regular expressions. You
seemed to imply that globbing was a subset of regular
expression patterns, and this is not true at all.
For example, consider how the asterisk is used in
globbing: it is a wild card for zero or more
characters at the current position. In regular
expressions, an asterisk has an entirely different
meaning: zero or more occurences of the previous
character at the current position.
(Actually, in regular expressions, the asterisk means
zero or more occurences of the previous regular expression, so that [abc]* means any combination of the 3 letters a,b, and c.)
-----------------
Of course, this is perfectly true. My intended meaning was that the building of symbolic expressions is deep and wide!
Thanks!
Peter
|