mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
How would i remove the letters in a line that looks like:

IP.NUM.BER.HERE:port?Password=xxx

i want the red part removed from the line, the IP.NUM.BER.HERE can also be a written host.. a.host.com:port?Password=xxx

the xxx can be anything, numbers or text, even a * or something like that, and the length of it can be longer or shorter too..
and it's set in a %var . so i guess $remove - $replace can be used to solve this?


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Code:
$gettok(IP.NUM.BER.HERE:port?Password=xxx,1,63)

Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Ty, i will try understand what your code does.. smile "if it working" wink


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Mar 2006
Posts: 12
Z
Pikka bird
Offline
Pikka bird
Z
Joined: Mar 2006
Posts: 12
if as you say the info is in a %var then use
Code:
  $gettok(%var,1,63) 


all this does is get token of %var, token 1, split by ascii code 63 which is the ?
so basicly its getting the first part or the %var before the ?

smile


Link Copied to Clipboard