Code:
..
    if (!$regex($4,%noshow) && !$regex($2,%noshow)) {
..


change that too

Code:
..
    if (!$regex($1-,%noshow) && !$regex($1-,%noshow)) {
..


As i dont think the previous could ever be true since there is no $4 or $2 leading the regex match to always be false.