[EMAIL PROTECTED] wrote: > Hi all, > I am writing a script to visualize (and print) > the web references hidden in the html files as: > '<a href="web reference"> underlined reference</a>' > Optimizing my code, I found that an essential step is: > splitting on a word (in this case 'href'). > > I am asking if there is some alternative (more pythonic...):
For *this* particular task, certainly. It begins with import BeautifulSoup The rest is left as a (brief) exercise for the reader. :-) As for the more general task of splitting strings using regular expressions, see re.split(). -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list