Eli the Bearded wrote: ) In comp.lang.perl.misc, Willem <wil...@toad.stack.nl> wrote: )> In Perl, it would be applicable. You see, in Perl, you can call a function )> in the replacement of the regex substitution, which can then look up the )> html entity and return the wanted unicode literal. ) ) A function? I'd use a hash.
A function can return a sensible value for unknown substitutions. In the case where you prebuild a giant regex or-list, that is not an issue, but I would match html entities generically. SaSW, Willem -- Disclaimer: I am in no way responsible for any of the statements made in the above text. For all I know I might be drugged or something.. No I'm not paranoid. You all think I'm paranoid, don't you ! #EOT -- http://mail.python.org/mailman/listinfo/python-list