Understanding Regular Expressions in VB.NET

While creating your application in ASP.NET you should use the regular expressions to check the format of the input by a user for a particular control. If the user has typed in the wrong format then the request will not be processed.


Regular expressions in VB.NET are extensively used to validate and process a string. By validation we mean that the form of a user’s input meets certain criteria as defined by the developer. For example regular expressions can be used to verify the format of telephone number, social security numbers, email addresses, or any string that have a specific format. If the user’s input does not meet the format then the regular expression validator control is raised and the user will be prompted of the error.

By processing of the string we mean that you can parse a large amount of text to extract, edit, replace, or delete text substrings; or to add the extracted strings to a collection in order to produce a report. The significant feature of the regular expressions in VB.NET is that you can incorporate regular expressions of other languages such as Perl and Awk.

Since the classes of the regular expressions in VB.NET are derived from a common base class library, these regular expressions can be used with many languages and tools that are .NET compatible. You can use regular expressions in VB.NET for the applications to match behavior, backreferences, backtracking, quantifiers and empty matches, and thread safety purposes. There are regular expressions engines available that are used to match the pattern with the string. Some of the engines are Nondeterministic Finite Automation engine, Deterministic Finite Automation engine, and POSIX NFA engine.

The .NET Framework uses Nondeterministic Finite Automation (NFA) engine because they are more expressive than other engines such as Deterministic Finite Automation (DFA) engine and POSIX NFA engine. Moreover this engine can be used to quickly find matches or to favor specific expansions over others. Because of these engines the developer’s time is saved.

_______________________________________________________________________

Add to My Yahoo!


FREE Subscription

Subscribe to our mailing list and receive new articles
through email. Keep yourself updated with latest
developments in the industry.

Name:
Email:

Note : We never rent, trade, or sell my email lists to
anyone. We assure that your privacy is respected
and protected.

Visit .NET Programming Tutorial Homepage

______________________________________________________

Recommended Resource


| Privacy Policy for www.dotnet-guide.com | Disclosure | Contact |

Copyright - © 2004 - 2017 - All Rights Reserved.