mIRC Home    About    Download    Register    News    Help

Print Thread
#172179 07/03/07 12:37 AM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
say the string is like this:

:008:host YEBWPYSG938267:<br/>

the string will always be the same apart for the 'YEBWPYSG938267' part. How can I grab the 'YEBWPYSG938267' part using regex?

pouncer #172180 07/03/07 12:53 AM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Code:
//noop $regex(:008:host YEBWPYSG938267:<br/>,/^:008:host ([^:]+):/) | echo -a $regml(1)

hixxy #172181 07/03/07 01:06 AM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
thanks alot hixxy, that is perfect. 1 question

could i also change that into an if?

like

if (whatever/check for 001 here) echo -a $regml(1)

because the data is incoming through a socket

pouncer #172183 07/03/07 01:15 AM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Yep. if ($regex(...,...)) { echo -a $regml(1) }

hixxy #172185 07/03/07 01:44 AM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
thanks!!


Link Copied to Clipboard