Fix #470

undef regex means not a regex. empty string means a // check.