I have gotten the body text of a medical document using BeautifulSoup from a :

```
import requests  
r = requests.get('https://www.mtsamples.com/site/pages/sample.asp? 
Type=24-Gastroenterology&Sample=2332-Abdominal%20Abscess%20I&D')

from bs4 import BeautifulSoup  
soup = BeautifulSoup(r.text, 'html.parser')  
results = soup.find_all('div', attrs={'id':'sampletext'})

body_text = soup.find('body').text

```

The web page the text was scraped from was not designed with any semantic markup, it's just a big blob of text with bold headings. The body text is as follows:

```
'\n\n\n\n\n \nTranscribed Medical Transcription Sample Reports and Examples\n\n\n\n\n\n\n\n\n\n\n\r\n(adsbygoogle = window.adsbygoogle || []).push({});\r\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n|\n\n\n\n\n\nvar addthis_config = {"data_track_clickback":true};\nView this sample in Blog format on MedicalTranscriptionSamples.com\n\n\n\n\n\n\n\n\n\n\n\n\r\n(adsbygoogle = window.adsbygoogle || []).push({});\r\n\n\n\n\n\nvar addthis_config = {"data_track_clickback":true};\n\n\n Sample Type / Medical Specialty:  Gastroenterology\nSample Name: Abdominal Abscess I&D \n Description:  Incision and drainage (I&D) of abdominal abscess, excisional debridement of nonviable and viable skin, subcutaneous tissue and muscle, then removal of foreign body.\r\n        (Medical Transcription Sample Report)\n\nPREOPERATIVE DIAGNOSIS:  Abdominal wall abscess.POSTOPERATIVE DIAGNOSIS:  Abdominal wall abscess.PROCEDURE:  Incision and drainage (I&D) of abdominal abscess, excisional debridement of nonviable and viable skin, subcutaneous tissue and muscle, then removal of foreign body.ANESTHESIA:  LMA.INDICATIONS:  Patient is a pleasant 60-year-old gentleman, who initially had a sigmoid colectomy for diverticular abscess, subsequently had a dehiscence with evisceration.  Came in approximately 36 hours ago with pain across his lower abdomen.  CT scan demonstrated presence of an abscess beneath the incision.  I recommended to the patient he undergo the above-named procedure.  Procedure, purpose, risks, expected benefits, potential complications, alternatives forms of therapy were discussed with him, and he was agreeable to surgery.FINDINGS:  The patient was found to have an abscess that went down to the level of the fascia.  The anterior layer of the fascia was fibrinous and some portions necrotic.  This was excisionally debrided using the Bovie cautery, and there were multiple pieces of suture within the wound and these were removed as well.TECHNIQUE:  Patient was identified, then taken into the operating room, where after induction of appropriate anesthesia, his abdomen was prepped with Betadine solution and draped in a sterile fashion.  The wound opening where it was draining was explored using a curette.  The extent of the wound marked with a marking pen and using the Bovie cautery, the abscess was opened and drained.  I then noted that there was a significant amount of undermining.  These margins were marked with a marking pen, excised with Bovie cautery; the curette was used to remove the necrotic fascia.  The wound was irrigated; cultures sent prior to irrigation and after achievement of excellent hemostasis, the wound was packed with antibiotic-soaked gauze.  A dressing was applied.  The finished wound size was 9.0 x 5.3 x 5.2 cm in size.  Patient tolerated the procedure well.  Dressing was applied, and he was taken to recovery room in stable condition.\r\n        \n\n\n\n\n\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n\n\n\n\n\n\n\n\n\r\n(adsbygoogle = window.adsbygoogle || []).push({});\r\n\n\n\nKeywords: \r\n        gastroenterology, excisional debridement, subcutaneous tissue, abdominal wall abscess, foreign body, abdominal abscess, bovie cautery, abdominal, i&d, wound, incision, abscess, \r\n         \r\n                      \n\n\n\n\n\n\n\n\n\n\n  \n\n\nNOTE: These\r\n            transcribed medical transcription sample reports and examples are provided by various users and\r\n            are for reference purpose only. MTHelpLine does not certify accuracy and quality of sample reports.\r\n            These transcribed medical transcription sample reports may include some uncommon or unusual formats;\r\n            this would be due to the preference of the dictating physician. All names and dates have been\r\n            changed (or removed) to keep confidentiality. Any resemblance of any type of name or date or\r\n            place or anything else to real world is purely incidental.\n\n\n\n\n\nHome | MedicalTranscriptionSamples | MT911 | MTDictionary | MTSetup | MTHelpLine\nSitemap | Tell\r\n              a Friend | Contact\r\n              Us | Disclaimer\n\n\n\n\nTranscribed Medical Transcription Sample Reports and Examples\n\n\n\n\n\r\n  (function(i,s,o,g,r,a,m){i[\'GoogleAnalyticsObject\']=r;i[r]=i[r]||function(){\r\n  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\r\n  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\r\n  })(window,document,\'script\',\'https://www.google-analytics.com/analytics.js\',\'ga\');\r\n\r\n  ga(\'create\', \'UA-1275448-3\', \'auto\');\r\n  ga(\'send\', \'pageview\');\r\n\r\n\n'

```

I want to extract the substring of the document text starting with the `Sample Type / Medical Specialty` field and ending with the `TECHNIQUE` field. In order to extract this substring of text I am attempting to use regex to parse out the characters directly before the `Sample Type / Medical Specialty` field and directly after the `TECHNIQUE` field:

```
import re

try:
    found = re.search('addthis_config = 
{"data_track_clickback":true};\n\n\n(.+?)\r\n        \n\n\n\n\n\r\n     
(adsbygoogle = window.adsbygoogle || []', body_text).group(1)
except AttributeError:
    # Start/Stop markers not found in the original string
    found = '' 

```

Clearly this is wrong but hopefully I get my point across that I'm trying to find a common start and stop markers of the body text. If you have any feedback or pointers on how to implement this I would greatly appreciate it.