ASP.NET News from Blogger: RegexLib.com - Recent Patterns   Get the feed of: RegexLib.com - Recent Patterns

Total News: 428

Regx for strong password

This Expression will allow at least one small letter, one capital and one numeric digit. And length of the password is minimum of 8 and allowed special chars are pre defined(@\$=!:.#%),special chars a...

DD-MM-YYYY Format Date Validator

This expression can be used to validate any date entered in correct DD-MM-YYYY format. Takes care of Leap Years too.....

JavaScript number

Validates that a string represents a javascript number (as defined by ECMAScript 3 Specs): integer (base-10) or floating point including in the exponential notation. Doesn't match the empty string....

Validate HTM/HTML/ASP/ASPX

Validate HTM/HTML/ASP/ASPX e.g. PageName.html...

Validate Filename.PageName,ImageName Extensions etc

Validate Filename,PageName,ImageName etc such as filename.doc filename.xls pagename.aspx pagename.asp pagename.htm pagename.html Extensions etc ......

Limited Number of Digits with 0 or 2 Decimal Places

Limits the max number of digits before the decimal point to 10; if decimal point is entered, requires entry of 2 decimal places. Allows for an optional negative sign. This pattern was derived to meet ...

RUT and RUN

Matches any-length chilean RUT (Rol Unico Tributario) and RUN (RUT (Rol Unico Nacional), with or without dots as thousand separator, and with or without hyphen as verification digit separator. Grab 1s...

Address Parser

A quick and dirty expression for splitting up a generic street address...

Url without Querystring

Modified URL RegExp that requires (http, https, ftp,gopher,telnet,file|notes,ms-help)://, A nice domain, and a decent file/folder string....

Positive Integers (Data type)

Matches any integer from 0 to 2147483647 (max Integer size for C#, Java, others)...

mm/dd/yyyy hh:mm:ss Date Time

I got a regex for date time from here, which had some bugs. so i referred a few regex from this site and created a regex which i tested and didnt find any errors. I will check again and update if requ...

Oracle Like TimeStamp validator

Oracle like time stamp with format: dd.MM.yyyy HH.mm.SS.xxxxxxx Based on European full proved date format with easy changeable dot separator. Optimized regular expresion....

Match a string containing at least 2 numbers and at least 6 alphabetic

Check password containing at least x numbers and y alphabetic. Use look back expression (?= )...

CURP (Mexican Code)

Simple Expression to evaluate a Mexican CURP Code...

Awesome US phone number matching

This regex matches US phone number formats that I found to be commonly used. This regex is best used on scanning text. If html is present, strip out the html first....

Get Plain Text From Html (Remove Html Tags)

This Regex Will Remove All Html Tags And Return Simple Plain Text . For Example In C#.NET : Regex.Replace(Html, "]*>", string.Empty);...

Check Farsi Unicode Character

This Regex chceck an input string for persian unicode character Note that it not work in javascript For Example In C#.NET: Regex.IsMatch(Text, "[\u0600-\u06FF]");...

Named Capture for SQL Server connection strings

Capture the information from a SQL Server connection string...

User name

My first REGEX pattern. Matches all alphanumerics + underscore (_) + dot (.)...

date validations

if (RadDatePicker1.SelectedDate == System.DateTime.Now.Date) { string strconnection; strconnection = ConfigurationSettings.AppSettings["ConnectionString"].ToString();...

Define Maximum length to a TextBox

This expression can be use to define the maximum length to a textBox. U can change the maximum character by replacing the last numeric value that is 10 in my example. Just change this number to your ...

Currency amount with or without $ and with commas

Needed to verify a currency amount entered has commas and two decimal spaces to the right. This has a range between 1.99 to the tens of millions. If you want to make the decimal side optional, add a q...

To validate the File Type for a FileUploader

You can use this to check the valid file type you have given to the last in the expression like ^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+(.pdf)$ This will accept .pdf only OR ^(([a-zA-Z]:)|(\\{2}\w+...

Multiple e-Mail Validator

This Expression will help you in Validating Multiple e-Mail IDs in a single line seperated by ";"...

Date with Leap year verification

This Expression verifies all the valid date in the US Date Format.It also checks the leap year.we can use this expression with or with out the prefix of zero in the date column and month column Eg[01/...

CSV parser (with Quotes) (.NET)

Returns the value from a CSV line....

Parentheses Quote

Very basic, but couldn't find it, so from one Regex noob to another... Needed to replace quotes around giant SQL INSERT unique numeric field; that was in quotes... In DW, FYI, I replaced with: ($2 $...

End Parentheses Price Quote Stripper

This was made to change non-decimal prices at the end of a huge SQL Insert... To use to replace in DW (without quotes) use sub expression like: $2,$4)...

XML Tag Value

This regex gets the value within an XML Tag. For example, given the following tag: result is here it returns the string "result is here". Replace TAGNAME with your tag name....

Non localised currency format

Expression to validate currency formatted numbers without the currency symbol...

U.S. social security number

pattern match for U.S. social security number...

XSD Duration

This expression was derived from Mike Cromwell's version, which matches the XSD schema duration built in type as defined by http://www.w3.org/TR/xmlschema-2/#duration. This version adds named capture...

Parse quoted phrases and single words for searching

RegEx will match phrases in double-quotes or words separated by spaces. It excludes the double-quotes from matches...

Validate strong password

This regular expression can be used to validate a strong password. It will evaluate to true if the following critera are met: Must be 15 characters in length total Must contain at least 1 digit Mus...

ICD-10 Code (World Health Organization)

This expression matches ICD-10 code...

Number input validation

This Regex is usefull to validate if the text typed will still lead to a valid number for a international input. Replace , with \. to get an american notation...

Number with Decimal

This expression validate the add of numbers with or without decimal...

Fractions / Fractional Odds

This simple expression is used to validate fractions or UK odds. It will match integers, allowing 10/1 to be entered as 10, and fractions. It will not match negative numbers or fractions, spaces or an...

Get key value pairs separated by colon in a comma separated string

Sometimes I want to store some key value mapped data in xml or text file, and then retrieve them into hashtable in program. Authough this can be done by split the string by comma and colon, and then t...

Match unanchored urls in unstructured text

Use this regex to match urls (including folder, file and querystring) in unstructured text that are not in anchor tags. Replace with $1 to create anchor tags....

CSS commentary

With this regex you can find or replace any CSS commentary in your stylesheets in once. Build for use with dreamweaver. Probably works also fine in any other circumstances....

html <td>

match *** in html,so any other html mark with is just do a little change to this...

Longitude regex

first regex put on site. longitude must>=-180 & <180....

SQL Server 2005 datetime validation

This expression validates most legal dates for a SQL Server 2005 datetime format. It includes checking for leap years. (Written for a default U.S. install, not sure what results would be on versions f...

Javascript Tokenizer

Tokenize a Javascript document for parsing each token is a language-token : string, int, float, comment, multiline comment, operator, expression etc. etc....

Simple SELECT statements

This finds the SELECT part of a SQL select statement. It does not find the entire FROM statement. That is a different RegEx I will post later....

Is Valid XML Node Or Attribute Name

Valid XML Node or Attribute Names start with a letter , an underscore or a colon (generally avoid using a colon) The next characters may be letters, digits, underscore, hyphens, periods and colons ...

VB.NET or VB Comments

Filters out VB.NET and VB6.0 comments....

Validates the most of the email formats

This expression will validates most of the email formats....

Full Name Parser

Finds title, first name, middle initial, last name, and suffix of a name. Middle names are added to first name. Uses .Net capture group names....

View Other bloggers