in reply to Re: Bug with "last successfully matched regular expression" (empty regex)
in thread Bug with "last successfully matched regular expression" (empty regex)
I thought I could make this more obvious by implementing functions like nodege(), noflip(), and noflop() to write something like
grep { noedge(/DBIC/ .. /DANCER/) }@list;
but try guessing which magic behavior hinders that:
DB<52> @list= ("a".."c","DBIC","A".."C","DANCER","a".."c"); DB<53> sub ff { print $_[0]} DB<54> grep { ff(/DBIC/ .. /DANCER/) } @list; 0000000000 DB<55> grep { my $x=(/DBIC/ .. /DANCER/); ff($x) } @list; 12345E0
Of course I could also use something like compiled regexes for EDGE, FLIP, FLOP to be able to type something like:
grep { (/DBIC/ .. /DANCER/) !~ EDGE } @list;
but that doesn't seem to be trivial, too :-(
Thanks anyway!
Cheers Rolf
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Bug with "last successfully matched regular expression" (empty regex)
by LanX (Saint) on Feb 24, 2012 at 15:32 UTC | |
by tye (Sage) on Feb 24, 2012 at 20:49 UTC | |
by choroba (Cardinal) on Feb 24, 2012 at 15:40 UTC | |
by LanX (Saint) on Feb 24, 2012 at 15:48 UTC |