mIRC Home    About    Download    Register    News    Help

Print Thread
#195915 05/03/08 09:55 PM
Joined: Oct 2007
Posts: 214
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Oct 2007
Posts: 214
Hello,

Does anyone know how would I go about getting 12.34.56.78 from this mask here? *!*@12.34.56.78

Could there be something done with regex?

Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

//echo -a $gettok(*!*@12.34.56.78,2,64)

Joined: Aug 2003
Posts: 144
M
Vogon poet
Offline
Vogon poet
M
Joined: Aug 2003
Posts: 144
Hi.

Try this

echo -s $regex( ? *!*@12.34.56.78, @/[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}/g)
echo -s $regml(1)

if in the same phase you have more that one you can use $regml(0) to return the total and them a while ...


I haven´t test this regex, don´t have a mirc product on this computer... But i think that is correct.

Good Luck

Last edited by Miguel_A; 05/03/08 10:13 PM.
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Regex can be useful, but it can also be overkill. Using $gettok is a better solution for something like that.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard