mIRC Home    About    Download    Register    News    Help

Print Thread
#83387 18/05/04 10:46 AM
Joined: Sep 2003
Posts: 10
Y
yythe1 Offline OP
Pikka bird
OP Offline
Pikka bird
Y
Joined: Sep 2003
Posts: 10
make an identifier $keep , which does the opposite option for $remove (also $keepcs) .
Exapmle : $keep(fabcdeg,a,b,f) = fab

#83388 18/05/04 10:52 AM
Joined: Dec 2002
Posts: 266
Z
Fjord artisan
Offline
Fjord artisan
Z
Joined: Dec 2002
Posts: 266
This could be useful in some applications.

If you're needing something like this at the moment and cannot make it yourself, check out:

Code:
//var %a whyhello,%b | !.echo -q $regsub(%a,/[^hel]/g,$null,%b) | echo -a %b


Use /ig (include the i) for case-insensitivity.

---Edit---

Also, you can use:
Code:
$regsub(%a,/([^hel])/g,$null,%b)


Note the parenthesis. Then use $regml to return what was removed.

Last edited by zack; 18/05/04 11:01 AM.

You won't like it when I get angry.

Link Copied to Clipboard