Whe I had to create CMS in PHP I created simple unescape html function that looked like this:
function unescape($s) {
$s= preg_replace('/%u(....)/', '&#x$1;', $s);
$s= preg_replace('/%(..)/', '&#x$1;', $s);
return $s;
}
How to translate it into C++ using Boost.Regex?
I’d guess it would look a bit like this:
But I assume the
.(DOT) should only match hexadecimal values, in which case I’d go for something like this instead:(note that I did not test this!)