mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2010
Posts: 969
F
Hoopy frood
OP Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
After banging my head against the keyboard I've discovered some inconistant behavior with \x:
Code:
\xNN - works as expected
\x{NNNN} - works as expected
\xNNNN - doesn't work


further more, after a certain codepoint (I'm not sure which) \x{NNNN} stops matching:
Code:
echo -a $regex( $chr($base(0600, 16, 10)), \x{0600})


Maybe related, maybe not, \u(does the same as \x) doesn't work at all

Last edited by FroggieDaFrog; 03/08/15 05:26 PM.

I am SReject
My Stuff
Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
Originally Posted By: pcre.txt
\xhh character with hex code hh
\x{hhh..} character with hex code hhh.. (non-JavaScript mode)
\uhhhh character with hex code hhhh (JavaScript mode only)
Where can you find that this syntax is supported by PCRE, (mIRC does not use javascript mode)


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Apr 2010
Posts: 969
F
Hoopy frood
OP Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
You are correct about \u being javascript, but that is not the main point of the bug report; \xNNNN not working at all, and \x{NNNN} stops working after a certain code point is.


I am SReject
My Stuff
Joined: Apr 2004
Posts: 871
Sat Offline
Hoopy frood
Offline
Hoopy frood
Joined: Apr 2004
Posts: 871
Originally Posted By: FroggieDaFrog
\xNNNN not working at all

As Wims said, this syntax is not supported by PCRE: unless javascript compatibility is enabled, \xNN only takes up to two hexadecimal digits.

Quote:
\x{NNNN} stops working after a certain code point

You need to add (*UTF8) for this to work.


Saturn, QuakeNet staff
Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
My post/quote was also showing that PCRE do not support \xNNNN


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard