Archive for the ‘Regex’ Category
Visual studio shortcuts
Its always time consuming to use all the features provided by an editor while coding (if you don;t know the hotkeys). For example, Visual Studio. When you are using a big editor like Visual Studio, you will have soo many functionalities to use while you code. Most of the time, these features goes unnoticed when you can’t find the shortcuts for those. Also the shortcuts will be too big to remember. Below mentioned ones are really handy. I will be talking from the C# point of view. So I really don’t know whether all these will work for all the languages. Read the rest of this entry »
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 Read the rest of this entry »
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
Read the rest of this entry »

