1. Computing

Using Regular Expressions in ASP.NET

By

5 of 7

Step by Step - Matching Against the RegEx

Here's how the regex matches our example string starting at the left side of both.

  1. < matches <
  2. /? matches 0 or 1 occurances of / (there are zero in our string)
  3. .+ matches 1 or more occurances of any character ("H1" in our string)
  4. /? matches 0 or 1 occurances of / (again, there are zero in our string)
  5. > matches >
  6. .+ matches 1 or more occurances of any character ("About Visual Basic!" in our string)
  7. < matches <
  8. /? matches 0 or 1 occurances of / (now there is 1 in our string)
  9. .+ matches 1 or more occurances of any character ("H1" again)
  10. /? matches 0 or 1 occurances of / (zero again)
  11. > matches >
  1. About.com
  2. Computing
  3. Visual Basic
  4. Learn VB.NET
  5. Learn ASP.NET
  6. Using Regular Expressions in ASP.NET

©2014 About.com. All rights reserved.