regex fixes

Suggested by owner in #369