mIRC Home    About    Download    Register    News    Help

Print Thread
#241621 07/05/13 05:25 AM
Joined: May 2013
Posts: 8
E
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
E
Joined: May 2013
Posts: 8
Hello would clean the chain and shown only letters
could not do to eliminate as numbers and special characters.

my simple script that does not work very well
Code:
%text = $remove($1-,!,?,¿,',.,*,1,2,3,4,5,),6,7,8,9,0,[,])
echo %text


Thank you very much to all who support this community selflessly. a hug and to expect your prompt replies. thanks

Joined: Jan 2004
Posts: 1,359
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,359
Code:
%text = $regsubex($1-,/[^a-z]/ig,)

Last edited by Loki12583; 07/05/13 03:53 PM.
Joined: May 2013
Posts: 8
E
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
E
Joined: May 2013
Posts: 8
Thank you very much Loki12583, a question. And how could I remove the colors?

Joined: Jan 2004
Posts: 1,359
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,359
Note that I corrected a typo in the original line, to remove colors you use $strip():

Code:
%text = $regsubex($1-,/[^a-z]/igS,)

Last edited by Loki12583; 07/05/13 05:56 PM.
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Alternatively you may use the capital letter S
Quote:
/igS
modifier available to mIRC regex to strip out colors.

Joined: May 2013
Posts: 8
E
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
E
Joined: May 2013
Posts: 8
Hello not work:

When I write so it works

<me>textext!!!!
<bot> textext

but when I write well does not work
<me> textext
<bot> textext

If I write the color no characters just does not work, but if I write special characters if it works

Last edited by Eliasayala1; 07/05/13 09:02 PM.
Joined: May 2013
Posts: 8
E
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
E
Joined: May 2013
Posts: 8
Hi remove the igS solve it, but I have another problem, I do not want to remove the spaces

for example
<me> Hii wiin !!! text ? aaa !! bbb
<bot> Hiiwiintextaaabbb

how could fix it, thank you very much for your help

Last edited by Eliasayala1; 07/05/13 09:17 PM.
Joined: Jan 2004
Posts: 1,359
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,359
Code:
%text = $regsubex($1-,/[^a-z ]/igS,)


If you want to allow more characters, put them inside the [] next to a-z. Most of them should work, a few are reserved characters and need to be escaped with \


Link Copied to Clipboard