Click here to Skip to main content
13,138,372 members (49,784 online)
Click here to Skip to main content
Add your own
alternative version


23 bookmarked
Posted 1 Jun 2003

Regex Tester

, 1 Jun 2003
Rate this:
Please Sign up or sign in to vote.
A simple Regex Tester. The code also illustrates the simple usage of regular expressions in .NET

Sample Image - regexTester.gif

<!------------------------------- STEP 3 ---------------------------><!-- Add the article text. Please use simple formatting (


etc) -->


The Regex Tester is an application to use for testing regular expression patterns on a test string, as we create the pattern, rather than testing it on the actual input, which may be sometimes time consuming, especially for large input strings.

Using the RegexTester

The usage is more straight forward. The input string is typed in the test string box, and the pattern is typed in the pattern textbox, as shown above.

Regular Expressions in .NET

Using regular expressions in .NET is pretty simple.. using the regularexpressions namespace available

Imports System.Text.RegularExpressions
' import the namespace

'instantiate the objects
dim oRegex as new regex("test pattern")

'use the object
If oRegex.IsMatch("this is the string to test on") Then
    msgbox "Match found"
    msgbox "Didnt find match"
end if

Points of Interest

The RegexTester with this article has a little nice feature for you to experiment. If the test string box is left empty, the application searches for a file teststring.txt (can be anything if the code attatched is aptly modified), and if the file is found, uses the contents of the file as a test string. This feature comes in needy, when the input string / test string is large.

If you already are conversant with simple .NET programming and the process of creating regular expression patterns, the Regex Tester might be all u need. ;)


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Harish loves computers for their basic quality of running tasks given and doing things clockwork without day-dreaming like him.

Note: My employer does not subscribe to my thoughts posted in my articles.

You may also be interested in...

Comments and Discussions

NewsThere's a new version of the RegEx Tester Tool ! Pin
BucanerO_Slacker1-Mar-08 23:25
memberBucanerO_Slacker1-Mar-08 23:25 
GeneralRegular Expressions with a range of numbers Pin
kongo1018-Nov-05 19:36
memberkongo1018-Nov-05 19:36 
GeneralRe: Regular Expressions with a range of numbers Pin
Harish Palaniappan19-Nov-05 7:24
memberHarish Palaniappan19-Nov-05 7:24 
GeneralHandy Pin
Voldo20-Apr-04 19:55
memberVoldo20-Apr-04 19:55 
GeneralExpresso Pin
Jonathan de Halleux2-Jun-03 20:30
memberJonathan de Halleux2-Jun-03 20:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170915.1 | Last Updated 2 Jun 2003
Article Copyright 2003 by Harish Palaniappan
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid