on *:TEXT:AutoReply ? Buffalo was milked * ago:#pets: {
set %min $iif((*min* iswm $6-),$gettok($left($6-,$calc($pos($6-,min,1) - 1)),-1,32),0)
set %sec $iif((*sec* iswm $6-),$gettok($left($6-,$calc($pos($6-,sec,1) - 1)),-1,32),0)
}

The above should (fingers crossed) deal with all the following
2min
2min 3sec
2min 3 sec
2 min
2 min 3sec
2 min 3 sec
3sec
3 sec

if case you want to know what its doing
the $iif sees if there is a *min* wildmatch to $6- ($6- is the words after "milked"),
if there is one of them it gets this value $gettok($left($6-,$calc($pos($6-,min,1) - 1)),-1,32)
that value is broken down as follows
$6- might be 12 min 5sec ago
$pos($6-,min,1) FIND THE first occurance of MIN 4
$calc( ^ - 1) get the position before than MIN 3
$left($6-, ^ ) get the string up to that position 12<space>
$gettok( ^ ,-1,32) get the last token in that string based on spaces seperating the token 12