Fixed encoding issues. Regex receives decoded string and it is encoded on output.