Skip Navigation LinksHome > Categories > Code from a Category

How to use Regex using ASP.NET 2.0 and VB.NET

User Name: codelecturer
Name: Mike Chauhan
Contact Me:
Home Page:
6 years of total IT experience including programming, application development, System Maintenance . 3 years of Experienced and expertise in .Net Framework VB, Visual Basic.Net, ASP.Net 2.0, 3.5 and AD... [More]
Viewed Times: 1318
Add Date: 11/19/2012
This article will show you how to Repeater pagesetting using ASP.NET 2.0 and VB.NET
.First, you need to import the System.Text.RegularExpressions namespace..

We use the Button1_Click to do work.
The Regex class contains several static methods that allow you to use a regular expression without explicitly creating a Regex object. Using a static method is equivalent to constructing a Regex object, using it once and then destroying it.

The Regex class is immutable (read-only) and is inherently thread safe. Regex objects can be created on any thread and shared between threads. The Methods of the Replace is Overloaded. Within a specified input string, replaces strings that match a regular expression pattern with a specified replacement string.

The front end Default.aspx page looks something like this:

The flow for the code behind page is as follows.

Happy Programming!!!

Post a Comment

Name: (Optional)
Email: (Optional, you can get an email if somebody replys your comments)*
Email me if somebody respons my comment below:
Enter Text
as Below:
(case insensitive, if hard to read, click the "get a new one" button)
* Your email address will not be shared with any third parties for any reason.
** Maximum 1000 charactors.