Prev | Current Page 411 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

A character class is a user - defined set of
symbols; the pattern is a match if at least one character in the set matches the current character in
the string. A character class is defined enclosing a string sequence inside the square parentheses. So the
sequence [abc] means any character that is an ??? a , ??? a ??? b , ??? or a ??? c . ??? A character set is a regex hard - coded
shortcut to a character class; the character set \d is equivalent to the character class [0 - 9] and it means
any digit character.
Table 8-6
Syntax Description
reserved characters:
.*+?^$|[()\/{-
Those are the characters that most commonly need to be escaped when
you have to match the symbol and not use its special meaning. There are
situations when escaping is not necessary because the regex parser can
easily disambiguate the use of the character by the context.
any reserved character
between \Q and \E
Suppresses the meaning of special symbols. Does not work in JavaScript.
\x00 Where 00 is any valid combination representing an ASCII/ANSI
character expressed as a hexadecimal value.


Pages:
399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423