to_regexp function added