scanning through page and replacing all instances of 00:00:00.00

Larry Bates larry.bates at websafe.com
Mon Apr 17 17:38:38 EDT 2006


Kun wrote:
> I have a python-cgi file that pulls data from an sql database, i am
> wondering what is the easiest way to remove all instances of
> '00:00:00.00' in my date column.
> 
> how would i write a python script to scan the entire page and delete all
> instances of '00:00:00.00', would i use regular expressions?

You could use regular expressions or you might want to take a look at
Beautiful Soup http://www.crummy.com/software/BeautifulSoup
to parse the page and replace the offending text.

-Larry Bates



More information about the Python-list mailing list