A Matcher object is used to search for a pattern in a string. Regex.Matcher returns a matcher object for a specific pattern and specific text. Example: Dimtext, patternAsString text = "This is an interesting sentence with two numbers: 123456 and 7890." pattern = "\d+"'one or more digits DimMatcher1AsMatcher Matcher1 = Regex.Matcher(pattern, text)
DoWhileMatcher1.Find Log("Found: " & Matcher1.Match)
Loop
Regex is a predefined object that contains regular expressions methods. All methods receive a 'pattern' string. This is the regular expression pattern. More information about the regular expression engine can be found here: Pattern Javadoc Regular expression in Basic4android tutorial.