diff --git a/result/regexp/issue370 b/result/regexp/issue370 new file mode 100644 index 00000000..42a74ec2 --- /dev/null +++ b/result/regexp/issue370 @@ -0,0 +1,3 @@ +Regexp: [A-Za-[G]] +G: Fail +a: Ok diff --git a/test/regexp/issue370 b/test/regexp/issue370 new file mode 100644 index 00000000..626b38e0 --- /dev/null +++ b/test/regexp/issue370 @@ -0,0 +1,3 @@ +=>[A-Za-[G]] +G +a diff --git a/xmlregexp.c b/xmlregexp.c index b29298d1..a2a36c49 100644 --- a/xmlregexp.c +++ b/xmlregexp.c @@ -5166,7 +5166,7 @@ xmlFAParseCharRange(xmlRegParserCtxtPtr ctxt) { } NEXTL(len); cur = CUR; - if ((cur != '-') || (NXT(1) == ']')) { + if ((cur != '-') || (NXT(1) == '[') || (NXT(1) == ']')) { xmlRegAtomAddRange(ctxt, ctxt->atom, ctxt->neg, XML_REGEXP_CHARVAL, start, end, NULL); return;