title: Difference between * and + in python regex?
body: <p>I am quite new to python and practicing a few regular expression from <a href="https://developers.google.com/edu/python/regular-expressions" rel="nofollow">google python exercies</a> 
  A section from there says :</p>
  
  <blockquote>
    <p><strong>Repetition</strong></p>
    
    <p>Things get more interesting when you use <code>+</code> and <code>*</code> to specify repetition
    in the pattern</p>
    
    <p><code>+</code> -- 1 or more occurrences of the pattern to its left, e.g. <code>i+</code> = one or more <code>i</code>'s</p>
    
    <p><code>*</code> -- 0 or more occurrences of the pattern to its left</p>
  </blockquote>
  
  <p>So I decided to try out some samples .</p>
  
  <pre><code>import re
  text="xx1  2   3xx"
  match = re.search(r'\d\s+\d\s+\d',text)
  match.group()
  </code></pre>
  
  <p>and this yields the following output : </p>
  
  <pre><code>1  2   3
  </code></pre>
  
  <p>and to understand the difference between <code>*</code> and <code>+</code> I tried this :</p>
  
  <pre><code>import re
  text="xx1  2   3xx"
  match = re.search(r'\d\s*\d\s*\d',text)
  match.group()
  </code></pre>
  
  <p>and yielded the output : </p>
  
  <pre><code>1  2   3
  </code></pre>
  
  <p>(the same as output 1)</p>
  
  <p>I still wonder,whether these : <code>*</code> and <code>+</code> really have same function? If not examples are much appreciated!</p>
  
  <p>Please correct me if I'm wrong somewhere.</p>