externalise regex patterns