I have a string, where I want to strip out an ip. Example of string:
Code: Select all
chefboyrd *** Notice -- Client exiting at 3dspawn.AwesomeChat.Net: ]killa_bnuts[!~B@24.226.26.107 (Killed (DaBigun (Automated file list scripts/bots are prohibited.)))
I have no problem stripping out the ip when there are no special charactters [ ] right before the ip, but when those are in there. It's gagging and spewing. Looking on the net, I found this snippet which was said to be the proper way to do this:
Code: Select all
set arg [join [lrange [split $arg] 0 0]]
which I would think would be
Code: Select all
set arg [join [lrange [split $arg] 8 8]]
in my case, then split the ip at the @ as im doing now. Is what I think correct???? Im having problems trying to test this in tclsh. Doesnt want to allow me to set the full string with what Im trying to work with.
Any help, as always is most appriceated.
droolin