fork download
  1. import re
  2.  
  3. regex = r'''\b(25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)\.(
  4. 25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)\.(
  5. 25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)\.(
  6. 25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)\b'''
  7. url_string = "http://110.234.52.124/paypal.ca/index.html"
  8. print( bool(re.search(regex, url_string, re.X)) )
Success #stdin #stdout 0.02s 9472KB
stdin
Standard input is empty
stdout
True