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

Enchanted Spring by Peggy Gaddis
Tombs of Endearments by Casey Daniels
The Houdini Effect by Bill Nagelkerke
The Good Doctor by Karen Rose Smith
One Day in Apple Grove by C H Admirand
Amelia by Diana Palmer
The Bad Girl by Yolanda Olson
The Earl Claims His Wife by Cathy Maxwell