Description | General:
- It is not clear how a null/empty string should behave as a pattern, I would assume that an empty pattern matches exactly to an empty string, but this would then also have to apply to all combinations of null/empty for pattern/string that there is no longer a distinction between null and empty.
List []:
-
It is not clear what a minus at the beginning or end of the bracket means, I think this should be an error and a minus as literal in the bracket should be escaped.
-
It is not clear how a roof (^) is treated if it is not the first character after the opening parenthesis. I think it should be treated as a literal, but could also be an error and should be escaped.
-
It is not clear if a closing parenthesis without an opening parenthesis is an error or it should be treated as a literal. I think this should be treated as an error.
-
It is not clear how a range should be handled if the first character is larger than the last (e.g. [z-a]). I think this is an erroneous like expression, but could also be a never-matching expression (there could be other elements in the list, so it could still match altogether).
-
It's not clear how to handle ranges of (multibyte) UTF-8 characters (e.g. [ä-ü]), I think these should match on all Unicode codepoints/UTF-8 encoded characters (both have the same order) in between (e.g. ö on [ä-ü]), so apparently this is also the case with e.g.
Perl regex.
Escape \:
-
Due to the above ambiguities regarding list, it should be explicitly stated which characters must be escaped inside and outside the list. It should be explicitly stated that all other characters must not be escaped accordingly and are seen as literal.
-
It is not clear whether characters that do not have to be escaped can be escaped anyway.
I'm for yes, because at least you are allowed to make fear-escapes, which are necessary because of all the ambiguities.
Any %:
- "If a '%' sign is intend in a string the list operand can be used": The correct instruction would be to escape the percent: '\%'. Likewise for single.
|
---|