Here's how the regex matches our example string starting at the left side of both.
- < matches <
- /? matches 0 or 1 occurances of / (there are zero in our string)
- .+ matches 1 or more occurances of any character ("H1" in our string)
- /? matches 0 or 1 occurances of / (again, there are zero in our string)
- > matches >
- .+ matches 1 or more occurances of any character ("About Visual Basic!" in our string)
- < matches <
- /? matches 0 or 1 occurances of / (now there is 1 in our string)
- .+ matches 1 or more occurances of any character ("H1" again)
- /? matches 0 or 1 occurances of / (zero again)
- > matches >
