Removes regex from pattern parameters

It has issues with unicode vs bytes, since regex only match one of
these.