implement Regexp#~ and String#~