0

In my html code:

<html>
<body>
<p> simple text <br>
next text sample <br>
end of para .. </p>

</body>
</html>

Using python reg ex I want to know how can I :

list= ['text' , 'sample' ]
#read each line and find the word from the list
# 
# then check whether the word is succeeded by a br tag
#
#

Can any one please share their suggestions?

Ray
  • 2,472
  • 18
  • 22
user3369157
  • 137
  • 1
  • 9
  • [Don't use regular expressions to parse HTML.](http://blog.codinghorror.com/parsing-html-the-cthulhu-way/) Here are some recommended [DOM parsers for Python](http://stackoverflow.com/q/2782097/87399). – Joe White Mar 02 '14 at 01:55
  • thanks for the reply!! If I want to do this using beautifulsoup , how shld i go about it? – user3369157 Mar 02 '14 at 02:05

0 Answers0