For my Teamspeak Viewer, I have this Output from Telnet.
How can I filter this for just having:
GFSTD Ghost, TeRrOr_ FiiL, _Alexander | PuMa_, _Fab, etc... means only the nicks of the users as output?
Also I need something like "string range" backwards
Is there something like that?
# ts_data holds raw data...
# Be adviced that there should be no newline within the regular expression below, although some browsers/editors may insert them to fit the code on the monitor (or other medium)
set nicklist [list]
foreach line [split $ts_data "\n"] {
regexp -- {([[:digit:]]+)[[:blank:]]+([[:digit:]]+)[[:blank:]]+([[:digit:]]+)[[:blank:]]+([[:digit:]]+)[[:blank:]]+([[:digit:]]+)[[:blank:]]+([[:digit:]]+)[[:blank:]]+([[:digit:]]+)[[:blank:]]+([[:digit:]]+)[[:blank:]]+([[:digit:]]+)[[:blank:]]+([[:digit:]]+)[[:blank:]]+([[:digit:]]+)[[:blank:]]+([[:digit:]]+)[[:blank:]]+([[:digit:]]+)[[:blank:]]+"([[:alnum:][:punct:]]+)"[[:blank:]]+"([[:alnum:][:punct:][:space:]]+)"} $line all p_id c_id ps bs pr br pl ping logintime cprivs pprivs pflags ip nick loginname
#data is stored in the variables p_id, c_id, ps, bs, pr, br, pl, ping, logintime, cprivs, pprivs, pflags, ip, nick, and loginname.
#They are overwritten for each iteration (line of data), so make something useful with them within the loop or they'll be lost...
lappend nicklist $nick
}