Find the ID, but how to select/copy the whole string by ID?

Zentrader zentraders at gmail.com
Wed Sep 19 16:43:12 CEST 2007


sourcefile.find(stringID) returns the start location. You can use
print to see this.  You can then slice from start+len(stringID) and
print it out.  That should give you enough info to figure out how to
find and extract to the end of the string tag as well.  There are
other ways to do this, but string.find is the easiest to understand.




More information about the Python-list mailing list