fork(2) download
  1. import re
  2.  
  3. rx = re.compile(r'\S+@\S+')
  4.  
  5. string = """This text contains an email@address.com somewhere"""
  6.  
  7. if rx.search(string):
  8. print("Somewhere in there is an email address")
Success #stdin #stdout 0.01s 9992KB
stdin
Standard input is empty
stdout
Somewhere in there is an email address