gitgabrio opened a new issue, #1448:
URL: https://github.com/apache/incubator-kie-issues/issues/1448

   TCK Tests revealed some cases where matches() wrongly behaves.
   
   1.     matches("O", "[A-Z-[OI]]", "i") should return false. Before fixing 
that, double-check in the specs that this is the expected behavior
   2.     matches("i", "[A-Z-[OI]]", "i") should return false. Before fixing 
that, double-check in the specs that this is the expected behavior
    
    
   This syntax is invalid for java Pattern
   `[A-Z-[OI]]`
   and correct one is
   `[A-Z&&[^OI]]` (see **_Character classes_** in 
[docs](https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html))
   
   [XML Schema Part 2: Datatypes Second 
Edition](https://www.w3.org/TR/xmlschema-2/)
   makes a distinction between _negation_ (`ˆ`) and _subtraction_ (`-`)
   See "Negative Character Group" and "Character Class Subtraction" at [regex 
chapter](https://www.w3.org/TR/xmlschema-2/#regexs).
   
   _**A negative character group is a [·positive character 
group·](https://www.w3.org/TR/xmlschema-2/#dt-poschargroup) preceded by the ^ 
character. For all [·positive character 
group·](https://www.w3.org/TR/xmlschema-2/#dt-poschargroup)s P, ^P is a valid 
negative character group, and C(^P) contains all XML characters that are not in 
C(P).**_
   
   _**A character class subtraction is a [·character class 
expression·](https://www.w3.org/TR/xmlschema-2/#dt-charexpr) subtracted from a 
[·positive character 
group·](https://www.w3.org/TR/xmlschema-2/#dt-poschargroup) or [·negative 
character group·](https://www.w3.org/TR/xmlschema-2/#dt-negchargroup), using 
the - character.**_
   
   A "translation" between the different syntax is required


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to