in reply to Grep matches all elements if compiled regex is passed as EXPR
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.
|
|---|