1. def re_find(pattern,text):
  2.     import re
  3.     txt=''
  4.     try:find=re.compile(pattern).findall(text)
  5.     except:return 'Error pattern'
  6.     if not find:
  7.         txt="Don't find anything"
  8.     else:
  9.         txt='Results:'
  10.         for i in xrange( 0,len(find)):
  11.             txt+='\n'+'['+str(i)+']'+find[i]
  12.     return txt
  13.  
  14.  
  15. txt='''<html>
    <meta author=blackw00d>
    <body>
    <br><tr><td>hello</td></tr><h1>bla</h1><a href="tyga">a Bot u ccbIJIka</a>
    </body>
    </html>'''
  16. pat='<[^>]+>'
  17. print re_find(pat,txt)