Decoding strings for Regex match.