title: while-loop in python as long as regex matches
body: <p>Ok, I'm aware that it's probably not the best way to edit a string with regex expressions in loops. Just for the sake of interest: How would I have to build a loop, that executes a regex pattern as long as it matches, run in a loop and stop when it doesn't hit anymore? Im doing this in python.</p>
  
  <pre><code>match = re.search(r'pattern, repl, str)
  while match (is True, == True?):
     sub = re.sub(r'pattern, repl, str)
  else:
     Do something else
  </code></pre>