in reply to Re: regex matching specific strings.
in thread regex matching specific strings.
$var =~ /^(?:abc)|(?:def)|(?:ghi)$/; is wrong. It matches strings that
You want
$var =~ /^(?:abc|def|ghi)\z/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: regex matching specific strings.
by markkawika (Monk) on Jul 22, 2009 at 23:50 UTC | |
by Anonymous Monk on Jul 23, 2009 at 00:42 UTC |