using the string functions (ex. find()) on a multi-symbol string

korean_dave davidreynon at gmail.com
Tue Jun 17 23:12:53 CEST 2008


How can i use the find() function on a string that is composed of tons
of symbols that cause errors...

THis is my string:

find("<html><head><meta name="qrichtext" content="1" /><style
type="text/css">p, li { white-space: pre-wrap; }</style></head><body
style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:
400; font-style:normal; text-decoration:none;"><p style=" margin-top:
0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-
indent:0; text-indent:0px; font-size:8pt;"><span style=" font-size:
10pt; color:green;">Connected!</span></p></body></html>","margin")

The tough part about this is that the string is dynamically produced.
So I can't manually go into the string and eliminate the quote-marks
or to "literal-character" them.





More information about the Python-list mailing list