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
13.46Mb 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

Finding Amy by Carol Braswell
A Girl From Flint by Treasure Hernandez
The Heat by Heather Killough-Walden
The Dowry of Miss Lydia Clark by Lawana Blackwell
Bear No Loss by Anya Nowlan
Winter at Mustang Ridge by Jesse Hayworth