You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "yesamer (via GitHub)" <gi...@apache.org> on 2024/07/31 11:39:02 UTC

[I] `matches()` function wrongly behaves [incubator-kie-issues]

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

   TCK Tests revealed some cases where `matches()` wrongly behaves.
   
   1.  `matches("abracadabra", "bra", "p")` should return an error, as the "p" flag doesn't exist; (Please check all the functions where the flags parameter is used e.g. `replace()`)
   2. `matches("\u212A", "k", "i")` should return true. \u212A is the [Kelvin Sign](https://codepoints.net/U+212A?lang=en), basically a K. Before fixing that, double-check in the specs that this is the expected behavior 
   3. `matches("O", "[A-Z-[OI]]", "i")` should return false. Before fixing that, double-check in the specs that this is the expected behavior 
   4. `matches("i", "[A-Z-[OI]]", "i")` should return false. Before fixing that, double-check in the specs that this is the expected behavior 
   5. `matches("input", "pattern", " ")` same as point 1.
   6. `matches("input", "pattern", "X")` same as point 1.
   7.  `matches("hello world", "hello\ sworld", "x")`The `x` is not supported. (Please check all the functions where the flags parameter is used e.g. `replace()`)
   8. `matches("h", "(.)\3")` `matches("h", "(.)\2")` and `matches("input", "\3")` should fail. Please investigate why they should fail


-- 
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: commits-unsubscribe@kie.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] `matches()` function wrongly behaves - checks and unicode [incubator-kie-issues]

Posted by "yesamer (via GitHub)" <gi...@apache.org>.
yesamer commented on issue #1409:
URL: https://github.com/apache/incubator-kie-issues/issues/1409#issuecomment-2309846785

   I run your changes against the TCK tests, and cases 5. and 6. are still not working. Is that intended?


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] `matches()` function wrongly behaves [incubator-kie-issues]

Posted by "gitgabrio (via GitHub)" <gi...@apache.org>.
gitgabrio commented on issue #1409:
URL: https://github.com/apache/incubator-kie-issues/issues/1409#issuecomment-2299059394

   @yesamer @bncriju 
   
   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))
   
   So, here the problem is to verify the syntax and, eventually, how to adapt it to java.
   
   ----
   
   For the "kelvin sign", the required flags are `iU`
   
   `matches("\u212A", "k", "i")` -> `matches("\u212A", "k", "iU")`
   
   Here, the problem is to fix the test (= add the `U` flag) or enable the `U` flag by default in our code
   
   
   
   


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] `matches()` function wrongly behaves - checks and unicode [incubator-kie-issues]

Posted by "baldimir (via GitHub)" <gi...@apache.org>.
baldimir closed issue #1409: `matches()` function wrongly behaves - checks and unicode
URL: https://github.com/apache/incubator-kie-issues/issues/1409


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org