CodeQL library for Swift
codeql/swift-all 2.0.4-dev (changelog, source)
Search

Member predicate RegExp::namedCharacterPropertyIsInverted

Holds if the named character property is inverted. Examples for which it holds:

  • \P{Digit} upper-case P means inverted
  • \p{^Word} caret also means inverted (not supported in Swift Regex but it may be in other regex parsers or in future versions of Swift).
  • [[:^digit:]]

Examples for which it doesn’t hold:

  • \p{Word}
  • \P{^Space} - upper-case P and caret cancel each other out
  • [[:alnum:]]
predicate namedCharacterPropertyIsInverted(int start, int end)