in reply to conditional regex
Why make things so complicated? You want to match /[yY](?:[eE][sS])?/ ... but 'eq' is so much simpler ...
I think I need to make Occam's Razore my new .sig ... no one else seems to be defending the concept.my $word = lc $_; print "yes\n" if $word eq 'y' or $word eq 'yes';
As Occam said: Entia non sunt multiplicanda praeter necessitatem.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: conditional regex
by ikegami (Patriarch) on Aug 23, 2010 at 03:35 UTC | |
Re^2: conditional regex
by Old_Gray_Bear (Bishop) on Aug 23, 2010 at 11:32 UTC |