mIRC Home    About    Download    Register    News    Help

Print Thread
#13606 28/02/03 08:52 PM
Joined: Dec 2002
Posts: 29
N
Nem3sis Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Dec 2002
Posts: 29
//var %a | echo -a $regsub(lalala u alalala u lalal,\bu\b,you,%a) ~ %a

echos: 1 ~ lalala you alalala u lalal

when it should return 2 ~ lalala you alalala you lalal

#13607 28/02/03 11:30 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
You have to use the global modifier if you want to find every match throughout the string. Just change your expression to /\bu\b/g and it'll work.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
#13608 28/02/03 11:59 PM
Joined: Dec 2002
Posts: 29
N
Nem3sis Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Dec 2002
Posts: 29
aah thnx


Link Copied to Clipboard