regexes to json