in reply to Grep matches all elements if compiled regex is passed as EXPR

When you don't put the slashes on, you're just testing the variable. $re (having a regex value) is true. /$re/ is a pattern match which can be true or false.

Caution: Contents may have been coded under pressure.