title: Python regex search lines that end with a colon and all text after until next line that ends with colon
body: <p>I have the following text:</p>
  
  <pre><code>Test 123:
  
  This is a blue car
  
  Test:
  
  This car is not blue
  
  This car is yellow
  
  Hello:
  
  This is not a test
  </code></pre>
  
  <p>I want to put together a regex that finds all items that start with a <code>Test</code> or a <code>Hello</code> and precede a colon, and optionally a tree digit number, and return all content after that until the next line that fits that same description. So for above text, the findall regex would return an array of:</p>
  
  <pre><code>[("Test", "123", "\nThis is a blue car\n"),
   ("Test", "", "\nThis car is not blue\n\nThis car is yellow\n"),
   ("Hello", "", "\nThis is not a test")]
  </code></pre>
  
  <p>So far I got this:</p>
  
  <pre><code>r = re.findall(r'^(Test|Hello) *([^:]*):$', test, re.MULTILINE)
  </code></pre>
  
  <p>It matches each line according to the description but I'm unsure how to capture the content until the next line that ends with a colon. Any ideas?</p>