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?

Comments

  1. Off by one error and strings... that has zero based strings smell...

    ReplyDelete
  2. Length('𢈢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 .......

    ReplyDelete

Post a Comment