Hello,

I was recently helped by Raimus2 with some code and it works very well.

I would appreciate help with further enhancement of this with the following:

i used the same above to strip 2min 3 sec in the line below but unfortunately doesn't work

<nick>AutoReply : Buffalo was milked 2min 3 sec ago

i want to be able to strip the numbers in min and sec and assign them to %min and %sec


<nick>AutoReply : Buffalo was milked 2min ago

on *:text:AutoReply*:#pets: {
if ($istok($1-,ago,32)) {
set %min $gettok($gettok($1-,$calc($findtok($1-,ago,32) - 1),32),1,109)
}
}

so its sets %min to 2

This would work for the line above but not when its in the formats:

<nick> Buffalo was milked 2min 3sec ago
<nick> Buffalo was milked 3sec ago

how can i code to include all formats: 2min ago,2min 3sec, 3sec ago
and assign the numbers to %min and %sec

Thanks for any help