0

I have data like this.

"Medical Advice: • Avoid cigarette smoke. • Nasal irrigation with normal saline 3-4 times a day after the surgery. • Patient's questions were answered. Medication Notes: Recommend the use of OTC Afrin- 2 sprays in both nostrils BID for 5 days then discontinue 9start after surgery). Schedule Follow-up: after scheduled surgery. Type of follow-up visit: post-op follow-up. Comments: [03/06/2018 4:21 PM Angela Cruz, CCMA]. Impression: We discussed the nasal fracture and they can consider a closed nasal fracture reduction. Treatment alternatives and respective risks were discussed including surgery and continued observation.The risks and benefits of closed nasal fracture reduction were discussed including: bleeding, infection, nasal obstruction, cosmetic deformity, and change in appearance. Questions regarding surgery were discussed in detail and concerns were addressed. Informed consent was obtained and surgery will be scheduled in the near future."

and I want to fetch all data from after scheduled surgery.

I used regular expression:

Match match = Regex.Match(PPtext, @"after\s*scheduled\s*surgery\s*(.*?)", RegexOptions.IgnoreCase);

But it give me only after scheduled surgery.

How do I get all data after these keywords?

shyam
  • 9,134
  • 4
  • 29
  • 44
Sam
  • 61
  • 1
  • 6
  • 1
    Try `(?<=after\sscheduled\ssurgery.\s)(.*)(?=")` [here](https://regex101.com/r/g5zc9D/1/) – Paolo Jul 09 '18 at 09:12
  • The `.*?` at the end matches 0 chars since it is lazy and does not need to match any text at all to succeed. Use `.*` or `.+` to match any 0 / 1 or more chars as many as possible. – Wiktor Stribiżew Jul 09 '18 at 09:41

0 Answers0