in reply to Re^3: Can "delayed-regex assertions" be nested...
in thread Can "delayed-regex assertions" be nested...

Hi,

Thanks for both suggestions!

I just told him :-D

The objective is to get a list all required elements of @a not present in @b while @b may have optional elements.
The desired client goal is to have this in a fancy grep oneliner for easy hideous copy-pasting across the code snippets.

The 2 code snippets reach the objective in an "unfancy way".


@B = grep ( /(??{join( '|', @A)})/gi, keys %H ); @B = grep ( !/(??{join( '|', @B)})/gi, @A ); print "Delta:\n"; print Dumper(@B); foreach $i (@A){if (!(grep (/$i/i, keys %H))){print "$i\n";};};

  • Comment on Re^4: Can "delayed-regex assertions" be nested...

Replies are listed 'Best First'.
Re^5: Can "delayed-regex assertions" be nested...
by ddn123456 (Pilgrim) on Feb 21, 2008 at 13:41 UTC
    PS It' also a nice opportunity to broaden my perl view ;-).