Pattern for a control-char matches non-control characters

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: 8, 11, 17, 21, 23
    • Component/s: core-libs
    • None

      Regexp pattern allow \\cx sequence to specify control-x character.
      Current implementation has two issues:

      1) It allows x to be any character, including non-ASCII and non-printable ones;
      For example, it is possible to have "\\c ", which will match "`".

      2) It allows to construct a regexp that will match non-control characters;
      For example "\\c`" will match " " (and the space char is not control-char).

      Another thing that should also be reviewed is that x is currently case-sensitive.
      For reference, perl treats \cA and \ca equally, and both regexps match ^A control-char.

            Assignee:
            Raffaello Giulietti
            Reporter:
            Ivan Gerasimov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: