title: Regular expression for extracting no. of days, months and years left
body: <p>I'm trying to write a regular expression that extracts the number of time left for something, which can be days, months or years.</p>
  <p>For eg, there is a sentence- &quot;This product has a shell life of 21 days or 21 (twenty-one) days or twenty-one days or 21 months, 21 years or five days or 5 (five) days or five (5) days or five(5) days.&quot;</p>
  <p>I know this is a funny sentence but the point is I want to extract the durations which is in the above sentence.</p>
  <p>I have written a regular expression <code>(?:\w*\-?\w*\s*\(\s*\d+\s*\w*\)\s*\w*|\b\d*\s+\w*\d*)\s*(?:year|month|day)s?</code> but its not extracting 5 (five) days or the duration which have a digit followed by (words). Can anyone help with the regex ?</p>
  <p>Thanks in advance</p>