mIRC Home    About    Download    Register    News    Help

Print Thread
#173118 20/03/07 11:00 PM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
say my string is like this
Code:
valign=up>Swtdave</td><td class=StyleTahoma><a href="../members/usrProfile.php?name=Swtdave"><img border="0" src='../webincludes/icons/userNbr.gif'></a></td><td class=StyleTahoma><a href='chatroom.php?rm=!!!Forties NMore Friends and Lovers'>!!!Forties NMore Friends and Lovers</a><br><a href='chatroom.php?rm=BBW Big Bold n Spicy'>BBW Big Bold n Spicy</a><br></td></tr></table>


if i do

Code:
        noop $regex(%txt, chatroom.php\?rm=(.*?)'>)
        echo -a $regml(0)


$regml(0) only gives me 1, shouldn't it be 2 as there's 2 rooms in the string:

!!!Forties NMore Friends and Lovers
BBW Big Bold n Spicy

Last edited by pouncer; 20/03/07 11:24 PM.
pouncer #173121 20/03/07 11:51 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
You need to use the global flag on the regular expression otherwise it will stop after the first match.

noop $regex(%txt, /chatroom.php\?rm=(.*?)'>/g)


Spelling mistakes, grammatical errors, and stupid comments are intentional.

Link Copied to Clipboard