Only build the regex once per-call

Build the regex outside of the isMatch function so it can be reused on
each row