mIRC Home    About    Download    Register    News    Help

Print Thread
#204380 17/09/08 07:10 PM
Joined: Oct 2007
Posts: 214
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Oct 2007
Posts: 214
Hello,

I am wanting to know if you have an output of:

*!*@123.456.789.100

How would I get only the first three octets and have a re-arranged format like this:

123.456.789.*

Thanks a bunch.

Jay

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
There may be a better way of doing this, but this will work

Code:
$gettok($gettok(*!*@123.456.789.100,2,64),1-3,46) $+ .*


Joined: Oct 2007
Posts: 214
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Oct 2007
Posts: 214
Thanks so much Russel.

That helped alot. I dont know why using $gettok didnt cross my mind.

Cheers

Jay

Joined: Dec 2002
Posts: 155
S
Vogon poet
Offline
Vogon poet
S
Joined: Dec 2002
Posts: 155
Here's another way:

Code:
$gettok($mask(*!*@123.456.789.100,4),2,64)


Edit: Added the $gettok.

Last edited by Strider; 18/09/08 06:56 AM.

Link Copied to Clipboard