Huuuuuuuum.. really, i can do this without the regex switch.
i am coding an addon that every time i run create a new window and connect a mud (like a telnet client, but can connect in various servers), and i use regex to match it because is far more simple get the number of the window with regsub. like this:
alias clio_window {
if ($1 isnum) return @MUD $+ ( $+ $1 $+ )
elseif ($1 == regex) return ^@MUD \(([0-9]+)\)$
}
alias clio_win-1 {
var %x = $regex(clio_win-1, $1, $clio_window(regex))
var %y = $regml(clio_win-1, 1)
return %y
}
so $clio_window(1) = @MUD (1) and $clio_win-1($clio_window(1)) = 1
and i would like to do anything like
menu -r $clio_window(regex) {
disconnect:clio_dis $clio_win-1($active)
}
and etc