About Regular Expressions in 10.2
About Regular Expressions in 10.2
uses System.RegularExpressions;
with TRegEx.Matches('𢈢456', '56') do
ShowMessage(Item[0].Value);
The Value should is "56" what I expected.
In fact result is "45".
Is my code wrong?
uses System.RegularExpressions;
with TRegEx.Matches('𢈢456', '56') do
ShowMessage(Item[0].Value);
The Value should is "56" what I expected.
In fact result is "45".
Is my code wrong?
Off by one error and strings... that has zero based strings smell...
ReplyDeleteLength('𢈢456') = 5 so I expect that this is a defect relating to surrogate pairs rather than ZBS. Then again, the code works fine on my XE7 under Windows so now I wonder whether it is in fact a mobile ZBS issue .......
ReplyDeleteSo, I try the Boost::Regex.
ReplyDeleteIt could correct result!
grandruru.blogspot.com - Boost Regex and Unicode in C++ Builder