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.57Mb 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

Satan's Revenge by Celia Loren
Trouble with Luv' by Pamela Yaye
Deadly Attraction by Calista Fox
Steamed (Steamed #1) by Nella Tyler
The Daughter He Wanted by Kristina Knight
The Satin Sash by Red Garnier
Shearers' Motel by Roger McDonald
The Rancher's Prospect by Callie Endicott