title: How to make a group for each word in a sentence?
body: <p>This may be a silly question but...</p>
  
  <p>Say you have a sentence like:</p>
  
  <blockquote>
    <p>The quick brown fox</p>
  </blockquote>
  
  <p>Or you might get a sentence like:</p>
  
  <blockquote>
    <p>The quick brown fox jumped over the lazy dog</p>
  </blockquote>
  
  <p>The simple regexp (\w*) finds the first word "The" and puts it in a group.</p>
  
  <p>For the first sentence, you could write (\w*)\s*(\w*)\s*(\w*)\s*(\w*)\s* to put each word in its own group, but that assumes you know the number of words in the sentence.</p>
  
  <p>Is it possible to write a regular expression that puts each word in any arbitrary sentence into its own group? It would be nice if you could do something like (?:(\w*)\s*)* to have it group each instance of (\w*), but that doesn't work.</p>
  
  <p>I am doing this in Python, and my use case is obviously a little more complex than "The quick brown fox", so it would be nifty if Regex could do this in one line, but if that's not possible then I assume the next best solution is to loop over all the matches using re.findall() or something similar.</p>
  
  <p>Thanks for any insight you may have.</p>
  
  <p>Edit: For completeness's sake here's my actual use case and how I solved it using your help. Thanks again.</p>
  
  <pre><code>&gt;&gt;&gt; s = '1 0 5 test1 5 test2 5 test3 5 test4 5 test5'
  &gt;&gt;&gt; s = re.match(r'^\d+\s\d+\s?(.*)', s).group(1)
  &gt;&gt;&gt; print s
  5 test1 5 test2 5 test3 5 test4 5 test5
  &gt;&gt;&gt; list = re.findall(r'\d+\s(\w+)', s)
  &gt;&gt;&gt; print list
  ['test1', 'test2', 'test3', 'test4', 'test5']
  </code></pre>