| SG RegExp | |
| Substring Object |
| Overview | Properties | Methods | Pattern Syntax |
Substring object represent matched pattern enclosed inside the parenthesis. Pattern expression can contain 9 subexpressions enclosed in the parenthesis.
Example:
Dim re
Set re = CreateObject("sgRegExp.RegExp")
re.Expression = "(a+)[^c]*(c+)"
re.Match "a bb ccc dddd"
After successful match, pattern expression "(a+)[^c]*(c+)" results in three substrings:
| Substrings(0) | full match | "a bb ccc" |
| Substrings(1) | first substring | "a" |
| Substrings(2) | second substring | "ccc" |