• Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • None
    • core-libs
    • None
    • b87
    • Verified

      Currently the regular expression \c control letter escape supports some characters it should not support and doesn't support some characters it should (although the latter is not required by ECMA).

      The characters that should not be supported are caused by toUpperCase converting Unicode to ASCII characters:

      /\cı/.test("\x09")
      => should return false instead of true

      /\cſ/.test("\x13")
      => should return false instead of true

      The characters that are supported by other engines are '0'-'9' and '_':

      /[\c0]/.test("\x10")
      => should return true instead of false

      /[\c_]/.test("\x1F")
      => should return true instead of false

      Invalid control letter should be escaped to \\c#:

      /[\c#]/.test("\\")
      => should return true instead of false

            hannesw Hannes Wallnoefer
            hannesw Hannes Wallnoefer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: