Chapter 8 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.
• 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