Prev | Current Page 422 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

match( ???My name is John Doe??™)); // false
trace(~/John(?! Doe)/.match( ???My name is John Roe??™)); // true
trace(~/(? < =John )Doe/.match(???My name is John Doe??™)); // true
trace(~/(? < !John )Doe/.match(???My name is John Roe??™)); // false
}
}
Unicode Support
All three platforms support patterns that contain Unicode multibyte characters (see Table 8 - 12 ). On
Neko, the regex support is provided by the PCRE library that must be compiled with the Unicode
support; the Windows setup, starting from haXe version 1.16, adopts the Unicode support by default.
Table 8-11
Syntax Description
(?=expr) Positive look-ahead. The pattern must be followed by a second pattern
defined in expr but expr is not included in the match.
(?!expr) Negative look-ahead. The pattern must not be followed by the
sequences that match expr.
(?<=expr) Positive look-behind. The pattern must follow a string that matches
expr. JavaScript does not support look-behinds.
(?matches expr.


Pages:
410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434