Decoding HTML escape sequences

2014-05-12 Thread Hugo Florentino via Digitalmars-d-learn
Hi, I have some documents where some strings appears in HTML escape sequences in one of these forms: \x3C\x53\x43\x52\x49\x50\x54\x20\x4C\x41\x4E\x47\x55\x41\x47\x45\x3D\x22\x4A\x61\x76\x61\x53\x63\x72\x69\x70\x74\x22\x3e

Re: Decoding HTML escape sequences

2014-05-12 Thread Adam D. Ruppe via Digitalmars-d-learn
You should use decodeComponent instead of decode in your matchAll loop. IMO encodeComponent and decodeComponent are the only two useful uri encode functions (btw same in JS, use decodeURIComponent instead of the other functions). The other ones have weird rules.