<html>
<body>
At 02:41 AM 1/5/2006, Intercodes wrote:<br>
<blockquote type=cite class=cite cite="">Hello everyone,<br><br>
Iam new to this mailing list as well as
python(uptime-3 weeks).Today I learnt about RE from
<a href="http://www.amk.ca/python/howto/regex/%22RE%27s">
http://www.amk.ca/python/howto/regex/</a>.This one was really helpful. I
started working out with few examples on my own. The first one was to
collect all the HTML tags used in an HTML file. I wrote this
code.<br><br>
------------------------------ <br>
import re<br>
file1=open(raw_input("\nEnter The path of the HTML file:
"),"r")<br>
ans=""<br>
while 1:<br>
data=file1.readline()<br>
if data=="":<br>
break<br>
ans=ans+data </blockquote><br>
Consider a shorter way to grab the entire file:<br>
ans = open(raw_input("\nEnter The path of the HTML file:
"),"r").read()<br><br>
[snip]</body>
</html>