Thanks guys! Chomping the newline did it, nice one!
In reply to Re^2: regex matching array values with foreach by jasper8989 in thread regex matching array values with foreach by jasper8989