Pattern Matching
Overview
Pattern matching is the process of searching text for occurrences of a specified pattern. The Internationalization Module offers several classes that assist in finding patterns in Unicode strings:
*RWUString provides methods contains(), index(), rindex(), and subString() that search text for occurrences of a specified substring, based on simple lexical comparisons of the code units in the strings.
*RWUStringSearch performs flexible, collator-based string searches, employing the rules encapsulated by an RWUCollator and an optional RWUBreakSearch to determine if and where a match occurs.
*RWURegularExpression searches text for occurrences of a specified regular expression pattern.
*RWURegexResult stores regular expression match results.
*RWURegexMatchIterator provides a convenient interface for finding all successive matches of a particular regular expression pattern in a string.
This chapter describes the various techniques for searching Unicode text supported by the Internationalization Module:
*lexical string searching
*locale-sensitive string searching
*regular expression string searching