A Simple C# RegEx Method

Category:
String Manipulation
Type:
Snippets
Difficulty:
Beginning
Author:
Anonymous

Version Compatibility: ASP.NET, C#

More information:
This C# method takes an HTML string as an argument and runs it through a simple RegEx pattern to extract the text displayed by the <h1> HTML tag. If a match is not found, it returns 'none'. This example assumes the tag has the attribute 'class' with a value of 'title'.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: