CodeQL library for Ruby
codeql/ruby-all 0.8.15-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
  • [[:^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)