[regex] merge tr in, allow any separator

This merges the tr plugin into regex to avoid redundancy and also now allows any separator to be used in place of `/`.