Posts Tagged: Regex


3
Jul 08

Masked TextBox in C#

Masked TextBoxes are those that won’t allow (or that will allow) certain strings, numbers or characters or patterns. Such kind of control is already present in the C#.Net with the name MaskedTextBox. This tutorial will suggest another way of doing such a TextBox in simple steps.

We will be using Regex in this tutorial. Its suggested that you have a look at the keywords used in writing Regex patterns [ RegularExpressions ].
RegexPal is an online regex tester. Its really handy at times.

Follow these steps to get a custom made masked textbox. We will be using Regex for specifying the mask Continue reading →


2
Jul 08

Regular Expressions in C#

RegularExpressions (AKA: Regex) are special strings that define a search pattern. Writing regex in C# is much similar to those you write in python. Some of the important keywords to be learnt before going in for Regex in C# are,

^ – denotes the start of the string
$ – denotes the end of the string
? – zero or one of the preceding element
* – zero or more of the preceding element
+ – one or more of the preceding element
\d – digits
\s – white space
Continue reading →