title: Getting contents of string, between two given sub-strings, using regex
body: <p>I'm trying to do some string operations in Python 3, and am struggling with a complicated issue which may be solvable in regex. I've tried to implement this myself but with no luck whatsoever.</p>
  <p>I think I require a split() operation of some description, with a regular expression inside catching strings contains '===SOMETEXT==='.</p>
  <p>The string type contains a series of headings, with paragraphs of content below. <strong>I want to somehow be able to extract the content between headings.</strong></p>
  <p>Example input:</p>
  <blockquote>
  <p>===Camcorders===<br />
  {{main|Camcorders}}<br />
  A camcorder is an electronic device combining a video camera and a video recorder. Although
  marketing materials may use the colloquial term &quot;camcorder&quot;, the name
  on the package and manual is often &quot;video camera recorder&quot;. Most
  devices capable of recording video are camera phones and digital
  cameras primarily intended for still pictures; the term &quot;camcorder&quot; is
  used to describe a portable, self-contained device, with video capture
  and recording its primary function.</p>
  <p>===Professional video camera===<br />
  {{main|Professional video camera}}<br />
  A professional video camera (often called a television camera even
  though the use has spread beyond [[television]]) is a high-end device
  for creating electronic moving images (as opposed to a [[movie
  camera]], that earlier recorded the images on [[filmstock|film]]).
  Originally developed for use in [[television studio]]s, they are now
  also used for [[music video]]s, [[direct-to-video]] movies, corporate
  and educational videos, marriage videos etc.</p>
  <p>These cameras earlier used [[Video camera tube|vacuum tubes]] and
  later electronic [[Image sensor|sensors]].</p>
  <p>===Television video camera===<br />
  .... etc</p>
  </blockquote>
  <p>The text between the '===' strings may vary, but always follow the pattern '===HEADING-HERE==='.</p>
  <p>Example output from query for 'Camcorders' section:</p>
  <blockquote>
  <p>A camcorder is an electronic device combining a video camera and a
  video recorder. Although marketing materials may use the colloquial
  term &quot;camcorder&quot;, the name on the package and manual is often &quot;video
  camera recorder&quot;. Most devices capable of recording video are camera
  phones and digital cameras primarily intended for still pictures; the
  term &quot;camcorder&quot; is used to describe a portable, self-contained
  device, with video capture and recording its primary function.</p>
  </blockquote>