Re: Splitting on a word
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Re: Splitting on a word

From: Joe <joe.woodward@padtinc.com>
Date: Wed Jul 13 2005 - 23:24:36 CEST

# string s simulating an html file
s='ffy: ytrty python fyt <A
HREF="wwwx">wx</A> dtrtf'
p=re.compile(r'\bhref\b',re.I)

list=p.split(s) #<<<<<<<<<<<<<<<<< gets you your final list.

good luck,

Joe
Received on Thu Sep 29 16:56:27 2005