Re: Lvalue Str::words iterator
by Larry Wall other posts by this author
Jun 15 2005 5:07PM messages near this date
Re: Lvalue Str::words iterator
|
Re: Lvalue Str::words iterator
Y'all are getting hung up on the correspondence of "words" with "word
characters", but you're ignoring the fact that most of the time people
want to do awk's version of splitting, matching \S+ words rather than \w+
words (*neither* of which actually matches what people usually mean
by words, in any case).
So I think .match should default to .match(rx:g/\S+/), if it defaults
to anything. But I still think people would find .words much clearer
when reading someone else's code. And the :g would be implicit,
so .words(/\w+/) would be still be a shortcut for .match(rx:g/\w+/).
Larry
Thread:
Ingo Blechschmidt
Juerd
Ingo Blechschmidt
Juerd
Larry Wall
Ingo Blechschmidt
Juerd
|