Re: [xml] caret in regexp character class



On 2017-03-07 19:52, Liam R. E. Quin wrote:
On Tue, 2017-03-07 at 14:48 +0100, Per Hedeland wrote:
Hello,

With libxml2-2.9.4, the regular expression [ab^cd] is equivalent to
[^cd], i.e. it matches all characters except 'c' and 'd'. However
from
my reading of
https://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#regexs, 


Compare XSD 1.1 https://www.w3.org/TR/xmlschema11-2/#regex which is
clearer and more recent. The ^ doesn't need to be escaped and [ab^cd]
should match any of 5 characters (as it does in Perl).

Liam

Thanks for the pointer and the confirmation (also to Csaba Raduly)!
I have created https://bugzilla.gnome.org/show_bug.cgi?id=779751 (with
patch).

--Per


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]