title: Finding all occurrences of a word in a string in Python3
body: <p>I am trying to find all words containing "hell" in 1 sentence. There are 3 occurrences in the below string. But re.search is returning only the first 2 occurrences. I tried both findall and search. Can someone please tell me what is wrong here ? </p>
  
  <pre><code>&gt;&gt;&gt; s = 'heller pond hell hellyi'
  &gt;&gt;&gt; m = re.findall('(hell)\S*', s)
  &gt;&gt;&gt; m.group(0)
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  AttributeError: 'list' object has no attribute 'group'
  &gt;&gt;&gt; m = re.search('(hell)\S*', s)
  &gt;&gt;&gt; m.group(0)
  'heller'
  &gt;&gt;&gt; m.group(1)
  'hell'
  &gt;&gt;&gt; m.group(2)
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  IndexError: no such group
  &gt;&gt;&gt; 
  </code></pre>