mIRC Home    About    Download    Register    News    Help

Print Thread
Getting a value #204380 17/09/08 07:10 PM
Joined: Oct 2007
Posts: 214
B
Buggs2008 Offline OP
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

Re: Getting a value [Re: Buggs2008] #204383 17/09/08 10:44 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
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) $+ .*


Re: Getting a value [Re: Buggs2008] #204387 18/09/08 12:59 AM
Joined: Oct 2007
Posts: 214
B
Buggs2008 Offline OP
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

Re: Getting a value [Re: Buggs2008] #204391 18/09/08 06:42 AM
Joined: Dec 2002
Posts: 155
S
Strider Offline
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.