Regex Articles

Masked Edit Control in C# using Regex

By┬áMichael J. Bullard We programmed a masked textbox control with C# that will convert the mask into a regular expression for each character in the field. It is designed to accept a user defined mask or a regular expression that defines each character in the field. If you pass it the mask as a string […]

Read more

C# Strings and Regular Expressions

3.0. Introduction It would be very rare to create an entireapplication without using a single string. Strings help make sense ofthe seemingly random jumble of binary data that applications use toaccomplish a task. They appear in all facets of application developmentfrom the smallest system utility to large enterprise services. Theirvalue is so apparent that more […]

Read more

Regular Expressions in C#

The following example shows the usage of Regular Expressions in C#. The program basically has all the Validation Programs using Regular Expressions. <pre> /* <howtocompile> csc /r:System.Text.RegularExpressions.dll,System.dll Validation.cs </howtocompile> */ using System.Text.RegularExpressions; using System; class Validation { public static void Main() { string strToTest; Validation objValidate=new Validation(); Console.Write(“Enter a String to Test for Alphabets:”); strToTest=Console.ReadLine(); […]

Read more