XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition (665 page)

BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition
12.98Mb size Format: txt, pdf, ePub

The
i
flag

This flag causes the regular expression to use case-insensitive mode. In this mode, a letter used in the regular expression matches characters in the input string regardless of their case; for example, the regex
Monday
matches the strings
Monday
or
monday
or
MONDAY
. Without this flag, characters must match exactly. Note that collations are not used for regex comparisons.

Case-insensitive mode affects constructs in the regular expression as follows:

  • When a character is used as an atom it represents that character and all its case variants. For example, the regex
    abc
    matches
    abc
    or
    ABC
    or
    Abc
    , among others.
  • When a character is used as an
    XmlCharIncDash
    within square brackets, it represents that character and all its case variants. For example, the regex
    [ab]
    matches
    a
    ,
    A
    ,
    b
    , or
    B
    . This applies even if the character appears as part of a negative character group or a subtraction; for example,
    [

    ab]
    matches any character except
    a
    ,
    A

Other books

Loving War by C.M. Owens
On Wings of Eagles by Ken Follett
Betrayed by M. Dauphin
The Uncoupling by Meg Wolitzer
The Amazing Life of Cats by Candida Baker