mIRC Homepage
Posted By: Buggs2008 Getting a value - 17/09/08 07:10 PM
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
Posted By: RusselB Re: Getting a value - 17/09/08 10:44 PM
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) $+ .*

Posted By: Buggs2008 Re: Getting a value - 18/09/08 12:59 AM
Thanks so much Russel.

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

Cheers

Jay
Posted By: Strider Re: Getting a value - 18/09/08 06:42 AM
Here's another way:

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


Edit: Added the $gettok.
© mIRC Discussion Forums