title: Java Regex, capturing groups with comma separated values
body: <p><strong>InputString</strong>: A soldier may have bruises , wounds , marks , dislocations or other Injuries that hurt him .</p>
  
  <p><strong>ExpectedOutput</strong>: 
  <br>bruises
  <br>wounds
  <br>marks
  <br>dislocations
  <br>Injuries</p>
  
  <p><strong>Generalized Pattern Tried</strong>:
   <br><pre>       ".[\s]?(\w+?)"+                 // bruises.
        "(?:(\s)?,(\s)?(\w+?))*"+             // wounds marks dislocations
        "[\s]?(?:or|and) other (\w+).";     // Injuries</pre></p>
  
  <p>The pattern should be able to match other input strings like: <em>A soldier may have bruiser or other injuries that hurt him.</em> </p>
  
  <p>On trying the generalized pattern above, the output is:
  bruises
  dislocations
  Injuries</p>
  
  <p>There is something wrong with the capturing group for "(?:(\s)?,(\s)?(\w+?))*". The capturing group has one more occurences.. but it returns only "dislocations". "marks" and "dislocation: are devoured.</p>
  
  <p>Could you please suggest what should be the right pattern, and where is the mistake?
  This question comes closest to this <a href="https://stackoverflow.com/questions/408482/regex-to-capture-an-optional-group-in-the-middle-of-a-block-of-input">question</a>, but that solution didn't help.</p>
  
  <p>Thanks.</p>