I need the regex to validate the user entered string, the string may be of following formats.

ex: `1w 2d 1h` or `2w 1h` or `1w 2d`. Likewise combinations of numbers and w,d and h. 

I am looking for the regex to allow the combinations number and `w` or `d` or `h`.

Is it possible to have a regex like that way?