title: newbie with regex, parsing one and only one character
body: <p>i have to validate strings like:</p>
  
  <pre><code>10y9m12od or 9m12od or 12d or 10y9m or 9m 
  </code></pre>
  
  <p>those are correct. </p>
  
  <p>These are not correct:</p>
  
  <pre><code>10d2m5y, 2m5y10d...
  </code></pre>
  
  <p>As you can see, order of elements is important but elements are not mandatory...</p>
  
  <p>I have this regex which I think it is fine but...:</p>
  
  <pre><code>([\d][yY]{1})?([\d][mM]{1})?([\d][o]{0,1}(d|D){1})$
  </code></pre>
  
  <p>Can anybody help me?</p>