Subscribe
Tutorial search

ASP.NET Regular Expressions Tutorials


Sort by:
Finding Blank Lines using regular expressions
Finding Blank Lines using regular expressions
In this regular expression we are going to find out blank lines. Means we are going to search lines containing only spaces (or Whitespace) and end of line.
Difficulty:
Finding Words using regular expressions
Finding Words using regular expressions
In this regular expression we are going to find out All Words. A word is a unit (member) of language that represents a concept which can be expressively communicated with meaning. A word consists of one or more morphemes which are linked more or less tightly together, and has a phonetic value.
Difficulty:
Email validation using regular expressions
Email validation using regular expressions
This ASP.net code validates any input string that was email address or not. First script checkes all charcters are alphanumeric values such as (a-z,A-Z), numbers (0-9), hyphens (-), underscore (_) and periods (.). Our first rule is to check any un-allowed characters exists. Second step to search an @ sign.
Difficulty:
Validate an email address using regular expressions
Validate an email address using regular expressions
email address are the means of communication with people around the world. While processing forms email address validation plays an important. Proper email validation strengthen our contact list, ban spamming and protect us from robot form filling (Form AutoFill). Here we are going to design a regular expression pattern to validate email address. which will check to make sure an e-mail address is a valid address, and in proper format means containing an username, at sign (@), and valid hostname. For example, admin@samplehost.com is valid, but SPAM@badhost is invalid. Most of email service provides limit the use of literals for email address creation. Only letters (a-z,A-Z), numbers (0-9), hyphens (-), underscore (_) and periods (.) are allowed and no special characters are accepted. You can add or remove any literals to your regular expression.
Difficulty:
What is Regular Expressions, an Introduction to Regular Expressions
What is Regular Expressions, an Introduction to Regular Expressions
Regular expressions(or regex) are a language used for more sophisticated form and text processing. They are often used to perform complex search-and-replace operations, and to validate that text data is well-formed. Regular expressions can be used to perform all sorts of powerful text processing and manipulation in just about every language and on every platform. Every regular expression either matches text (search) or matches and replaces text (search and replace).
Difficulty:
Matching literal (normal) text characters with Regular Expressions
Matching literal (normal) text characters with Regular Expressions
Basically rejex are used to search a character, word, string or string pattern. Here we are going to search for a single literal character. Consider we want search for "o" in the string patter "Poonam like mango". It will match the "o" after the "P". The default behavior of most regular expression engines is to return just the first match. Though this regex can match the second "o" too. Most regex implementations provide a mechanism by which we can obtain a list of all matches when the regex engine start searching through the string after the first match.
Difficulty:
Matching text with Special meta-characters using Regular Expressions
Matching text with Special meta-characters using Regular Expressions
Rejex are more powerful and we want to do more than simply search for literal pieces of text. There are certain reserved meta-characters with Special uses and meaning. These "metacharacters" are: the square bracket [...], the backslash , the caret ^, the dollar sign $, the period or dot ., the vertical bar or pipe symbol |, the question mark ?, the asterisk or star *, the plus sign +, the round bracket () and the Curly Brace {}. Below table well explain us with the usability of each metacharacter.
Difficulty:
Regular Expressions IP Address Validation with .net
Regular Expressions IP Address Validation with .net
This regular expression will check for valid Internet Protocol (IP) address. Here we are going to search four decimal numbers groups, each separated by a dot. each set contains zero to three digits. Here regular expression check for two group which on concatenation generate a valid IP address. First group select from 3 alternatives which will find decimal number range from 0 to 255 ending with .(dot or period), exactly 3 repetitions and Second group select from 3 alternatives which will find decimal number range from 0 to 255.
Difficulty:
Regular Expressions with .net - U.S. Social Security Numbers
Regular Expressions with .net - U.S. Social Security Numbers
This regular expression will check for valid U.S. Social Security Numbers. Here we are going to search three sets of digits separated by hyphens; the first set contains three digits, the second set contains two digits, and the third set contains four digits. First first group will check wheather all digit are not zero. Then we are performing search between two alternatives, eighter in-between 001 to 699 or in-between 001 to 772. Second group will check wheather two digit are not zero and any range in-between 01 to 99 Second group will check wheather four digit are not zero and any range in-between 0001 to 9999
Difficulty:
Search Term(s) (2): regular expressions