Simple Match

import re
content = "Eminem means positive"
a = re.search('^Em.*ve$', content)
if(a):
    print('matched')
else:
    print('not matched')
matched

More situations

  • Match Canadian postal code
  • Phone number
  • Start with /home
  • Contains /User/raja