Alan@lcs.mit.EDU (Alan Bawden) writes:
> Date: 08 Jan 1997 12:55:30 -0500
> From: Olin Shivers <shivers@ai.mit.edu>
> (* <regex> ...) 0 or more matches
>
> I, too, am puzzled by the "..." here (and in several of the others).
I see this as consistent with the usual re-using tools in
4.4BSD and other systems. Egrep -e pattern1 -e pattern2 -e pattern3
in those systems will match on any of the patterns.
Having (* <regex1> <regex2> <regex3>) match 0 or more
matches of any of regex1, regex2 or regex3 seems natural
to me. Moreover, it is an obviously handy short-cut over
something like (or (* <regex1>) (* <regex2>) (* <regex3>))
when it comes to things like named regular expressions and
the like.
The notaion Olin proposes appears immediately useful to
me, since I spend far too much time trying to construct
ugly, complicated regular-expressions to sift through
badly-formatted log files or dumps of tables from routers.
It'll be nice to avoid the trade-off between ease of
debugging and number of calls to regexp-* or string-append
functions.
Sean.
|