mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2004
Posts: 6
T
tweaqer Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Aug 2004
Posts: 6
Does anyone know how to use $remove to delete
characters like ( or ) and { and }
I tried some things on it but i can't get it to delete those characters.
So any possibility to get this to work? smile
Thanks in advance :P

GreetZ Tweaqer

Joined: Jun 2004
Posts: 291
W
Fjord artisan
Offline
Fjord artisan
W
Joined: Jun 2004
Posts: 291
$remove works like:
$remove(Word,LettersToRemove)
for example
if i had the words "and hello"
//echo -a $remove(and hello,and)
would return the word hello
and remove the and

hope that helped

EDIT:
i misunderstood what you meant
laugh sorry

Last edited by whatsthedillio; 26/08/04 05:55 PM.
Joined: Mar 2004
Posts: 540
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Mar 2004
Posts: 540
FIrst off youd need to find the ascii number
Code:
 /ascii { 
  echo Character $+ $chr(9) $+ ASCII value $+ $chr(9) $+ Alt+
  VAR %a = 32 
  WHILE (%a <= 255) { 
    echo $chr(%a) $+ $chr(9) $+ %a $+ $chr(9) $+ $base(%a,10,10,4) 
    INC %a 
  } 
} 

Is how I found it
( = 40
) = 41
{ = 123
} = 125
So then youd do $remove(%var,$chr(125))

Joined: Aug 2004
Posts: 6
T
tweaqer Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Aug 2004
Posts: 6
Wow I must say; very smart found there Armada I'm going to test it right away! Also thanks whatsthedillio for your quick respond.
Also for a subquestion is it also possible when you have a tekst like this [BLUE] [RED] [BLUE] to delete all characters matter how many spaces or character with the color red?

Thanks again, you guys are always great help smile

Tweaqer

Last edited by tweaqer; 26/08/04 05:57 PM.
Joined: Mar 2004
Posts: 540
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Mar 2004
Posts: 540
Remove just read? Id do $remove(%var,$chr(3) $+ 4)
To get the color code for the ctrl+k do ctrl+k dont pick a color then do
//echo ! $asc()
and
! 3
Will appear

Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
If you want to remove all red text in a line you'd have to use regex.

alias removered {
var %a, %b = $regsub($1-,/(?:04|4(?!\d))[^]*/g,,%a)
return %a
}


usage: echo -s -> $removered(your text with red text in between)

Joined: Mar 2004
Posts: 540
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Mar 2004
Posts: 540
/me needs to learn regex bah


Link Copied to Clipboard