Code: Select all
KuBuntU!~KuBuntU@xxxxxx.eu User: KuBuntU IRC: KuBuntU!~KuBuntU@xxxxxx.eu
$ircidentnow $username $savedircident
the User: and IRC: i not want in any of variables.
Code: Select all
KuBuntU!~KuBuntU@xxxxxx.eu User: KuBuntU IRC: KuBuntU!~KuBuntU@xxxxxx.eu
KuBuntU wrote:I have this in a variable $lineand i wanted this splited up as variable.Code: Select all
KuBuntU!~KuBuntU@xxxxxx.eu User: KuBuntU IRC: KuBuntU!~KuBuntU@xxxxxx.eu
$ircidentnow $username $savedircident
the User: and IRC: i not want in any of variables.
Code: Select all
regexp -- {(.+?)\sUSER\:\s(.+?)\sIRC\:\s(.+?)} $line -> ircidentnow username savedircident
Code: Select all
regsub -all {(?:USER\:\s|IRC\:\s|\s\s)} $line "" line
set ircidentnow [lindex [split $line] 0]
set username [lindex [split $line] 1]
set savedircident [lindex [split $line] 2]
Code: Select all
scan $line "%s User: %s IRC: %s" ircidentnow username savedircident