refactor 314-regex.t