Converting html entities into their values in python

Posted by tipu on Stack Overflow See other posts from Stack Overflow or by tipu
Published on 2010-05-02T23:26:42Z Indexed on 2010/05/02 23:27 UTC
Read the original article Hit count: 199

I use this regex on some input,

[^a-zA-Z0-9@#]

However this ends up removing lots of html special characters within the input, such as

227;, #1606;, #1588; (i had to remove the & prefix so that it wouldn't show up as the actual value..)

is there a way that I can convert them to their values so that it will satisfy the regexp expression? I also have no idea why the text decided to be so big.

© Stack Overflow or respective owner

Related posts about python

Related posts about special-characters