fork download
  1. import re
  2.  
  3. a = """A-1 Cafe Restaurant","Mon, Wed-Sun 11 am - 10 pm"
  4. "Nick's Lighthouse","Mon-Sun 11 am - 10:30 pm"
  5. "Paragon Restaurant & Bar","Mon-Fri 11:30 am - 10 pm / Sat 5:30 pm - 10 pm"""
  6.  
  7. text_which_we_fond = r"[^\r\n]*[\w\.+]+-[A-Za-z-]+[^\r\n]*" # шаблон поиска
  8. all_results = re.findall(text_which_we_fond, a)
  9.  
  10. for i in all_results:
  11. print (i)
Success #stdin #stdout 0.02s 27712KB
stdin
Standard input is empty
stdout
A-1 Cafe Restaurant","Mon, Wed-Sun 11 am - 10 pm"
"Nick's Lighthouse","Mon-Sun 11 am - 10:30 pm"
"Paragon Restaurant & Bar","Mon-Fri 11:30 am - 10 pm  / Sat 5:30 pm - 10 pm