mIRC Home    About    Download    Register    News    Help

Print Thread
#257163 17/03/16 11:31 AM
Joined: Mar 2016
Posts: 25
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Mar 2016
Posts: 25
$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.
SteveNunes #257164 17/03/16 02:20 PM
Joined: Jul 2006
Posts: 4,144
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,144
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.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #257166 17/03/16 02:44 PM
Joined: Mar 2016
Posts: 25
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Mar 2016
Posts: 25
i see... ty verymuch mate

SteveNunes #257171 17/03/16 07:03 PM
Joined: Dec 2002
Posts: 5,411
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,411
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).

Khaled #257174 18/03/16 10:34 AM
Joined: Mar 2016
Posts: 25
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Mar 2016
Posts: 25
thanks again! wink


Link Copied to Clipboard