Fixing regular expression conversion