Erm, I think the problem is with what you expect grep EXPR, LIST to do with a compiled regex in this case. If EXPR evaluates to a true value, the element is returned. A compiled regex instance is a true value (it's not undef or one of the many faces of 0), so every element will be returned; it's not compared against anything as you haven't told it to do anything with it.
In reply to Re: Grep bug -- doesn't handle passed, precompiled regular expressions properly
by Fletch
in thread Grep matches all elements if compiled regex is passed as EXPR
by isotope
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |