I would suggest moving this regexp into a constant.

Also `\Z` may not do what you want. You probably want `\z`.