Next: , Previous: , Up: List Operators ([] and [^])   [Contents][Index]


18.3.6.2 Equivalence Class Operators ([==])

Regex recognizes equivalence class expressions inside lists. A equivalence class expression is a set of collating elements which all belong to the same equivalence class. You form an equivalence class expression by putting a collating element between an open-equivalence-class operator and a close-equivalence-class operator. ‘[=’ represents the open-equivalence-class operator and ‘=]’ represents the close-equivalence-class operator. For example, if ‘a’ and ‘A’ were an equivalence class, then both ‘[[=a=]]’ and ‘[[=A=]]’ would match both ‘a’ and ‘A’. If the collating element in an equivalence class expression isn’t part of an equivalence class, then the matcher considers the equivalence class expression to be a collating symbol.