[Israel.pm] match & expression Q.
gaal at forum2.org
Sun Jul 18 01:10:31 PDT 2004
On Sun, Jul 18, 2004 at 10:34:07AM +0300, Yosef Meller wrote:
> > @vars = $string =~ /([0-9a-z])/gi;
> Well, if you don't 'use locale;' then [\w\d] is enough (because \w will
> match your locale's letters if you use locale). And I think you forgot a
> no locale; # If you used it
> @vars = $string =~ /([\d\w])+/gi;
Oops, you're right, dropping the + was an error.
But I'm avoiding \w here because it contains underscores, which were not
part of the class of characters the OP wanted.
Gaal Yahas <gaal at forum2.org>
More information about the Perl