mIRC Home    About    Download    Register    News    Help

Print Thread
$regex bug? #257163 17/03/16 11:31 AM
Joined: Mar 2016
Posts: 24
S
SteveNunes Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Mar 2016
Posts: 24
$regex(eu jŠ sabia,\bjŠ\b) - returns 0
$regex(eu ja sabia,\bja\b) - returns 1
$regex(eu jŠh sabia,\bjŠ\b) - return 1
$regex(eu jah sabia,\bja\b) - return 0

its a bug or so???

Last edited by SteveNunes; 17/03/16 11:35 AM.
Re: $regex bug? [Re: SteveNunes] #257164 17/03/16 02:20 PM
Joined: Jul 2006
Posts: 3,738
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,738
Hello, no it's not a bug, \b by default only checks for ascii, you must use the /u modifier, recently supported by mIRC. It tells the engine to use Unicode to identify characters.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: $regex bug? [Re: Wims] #257166 17/03/16 02:44 PM
Joined: Mar 2016
Posts: 24
S
SteveNunes Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Mar 2016
Posts: 24
i see... ty verymuch mate

Re: $regex bug? [Re: SteveNunes] #257171 17/03/16 07:03 PM
Joined: Dec 2002
Posts: 4,863
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,863
Thanks for your post. I checked your regular expressions at regex101.com and it returned the same results as mIRC. As Wims mentioned, you will need to use the /u modifier in the latest mIRC beta to handle Unicode characters or you can use (*UCP)(*UTF8) at the start of the pattern (see PCRE for more information).

Re: $regex bug? [Re: Khaled] #257174 18/03/16 10:34 AM
Joined: Mar 2016
Posts: 24
S
SteveNunes Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Mar 2016
Posts: 24
thanks again! wink