mIRC Homepage
Posted By: Eliasayala1 Help Regular Expressions - 07/05/13 05:25 AM
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
Posted By: Loki12583 Re: Help Regular Expressions - 07/05/13 02:29 PM
Code:
%text = $regsubex($1-,/[^a-z]/ig,)
Posted By: Eliasayala1 Re: Help Regular Expressions - 07/05/13 03:21 PM
Thank you very much Loki12583, a question. And how could I remove the colors?
Posted By: Loki12583 Re: Help Regular Expressions - 07/05/13 03:55 PM
Note that I corrected a typo in the original line, to remove colors you use $strip():

Code:
%text = $regsubex($1-,/[^a-z]/igS,)
Posted By: Tomao Re: Help Regular Expressions - 07/05/13 04:45 PM
Alternatively you may use the capital letter S
Quote:
/igS
modifier available to mIRC regex to strip out colors.
Posted By: Eliasayala1 Re: Help Regular Expressions - 07/05/13 09:00 PM
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
Posted By: Eliasayala1 Re: Help Regular Expressions - 07/05/13 09:17 PM
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
Posted By: Loki12583 Re: Help Regular Expressions - 07/05/13 10:56 PM
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 \
© mIRC Discussion Forums