title: extract few words before and after the specific word regex in Python?
body: <pre><code>r'((?:\S+\s+){0,3}\bwhite\b\s*(?:\S+\s+){0,3})
  </code></pre>
  
  <p>The result of above regex for below sentence is</p>
  
  <pre><code>sentence = This is a white floral garment.
  result = This is a white floral
  </code></pre>
  
  <p>But I want the result as </p>
  
  <pre><code>wanted result = This is a white floral garment
  </code></pre>
  
  <p>I want 3 words before and after the white word. If there are not three word after white than at least get all which are present there.</p>