(PUP-957) Change match operator wrt. Regexp type and add match function