Hi,
Can I use pyparsing to remove unwanted characters from a string. For example I have an xml message that I need to parse with characters like u'\u25c4'. I cant seem to print these characters so can I remove these characters? Use something other than pyparse?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
Can I use pyparsing to remove unwanted characters from a string. For example I have an xml message that I need to parse with characters like u'\u25c4'. I cant seem to print these characters so can I remove these characters? Use something other than pyparse?
You could, but I should think that this would be far simpler in straight Python, something like:
infile = open(htmlsource)
src = list(infile.read())
filtered =
open(outfile,"w").write("".join(filtered))
No?