'Wraps string expression like "1h 2m 3s" into number contains seconds (3723).
The string expression will be evaluated as mathematical expression, spaces between each groups
will be wrapped to "+" operand (only if any operand does not specified between).
Because of case insensitivity and overwriting with minutes ("m" or "mm"), the short replacement for month
are "mo" or "mon".
Ex: 1hour+30min = 5400
0d 1h 30m   = 5400
1year-6mo   = 15778800
6 months    = 15778800
warn: month is not 30 days, it is a year in seconds / 12, the leap years will be respected also:
>>>> float(str2seconds("1month")) / 60 / 60 / 24
30.4375
>>>> float(str2seconds("1year")) / 60 / 60 / 24
365.25
@returns number (calculated seconds from expression "val")'

@staticmethod
def str2seconds(val):

    if isinstance(val, (int, long, float, complex)):
        return val
    val = MyTime._str2sec_prep.sub('    \\1', val)
    for (rexp, rpl) in MyTime._str2sec_parts:
        val = rexp.sub(rpl, val)
    val = MyTime._str2sec_fini.sub('\\1+\\2', val)
    return eval(val)
