RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Alphanumeric
Expression
^[a-zA-Z0-9]+$
Description
Matches any alphanumeric string (no spaces).
Matches
10a | ABC | A3fg
Non-Matches
45.3 | this or that | $23
Author Rating: Not yet rated. Steven Smith
Source http://www.aspalliance.com/wiseasp/aboutregularexpression.asp
Your Rating
Bad Good

Enter New Comment

Title
 
Name
 
Comment
 
Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: shubham
Name: shubham
Date: 10/4/2021 12:54:29 PM
Comment:
sssss


Title: Matches any alphanumeric string (with spaces in between, not in first place and last place).
Name: Saroj Nayak
Date: 5/26/2011 5:58:57 AM
Comment:
Use following one: Really very useful everywhere. ([0-9a-zA-Z]+)|([0-9a-zA-Z][0-9a-zA-Z\\s]+[0-9a-zA-Z]+)


Title: abcd
Name: asdasdsa
Date: 6/17/2010 11:46:46 AM
Comment:
dsadsadsadsa


Title: ASP.Net 2.0
Name: Mansour
Date: 7/30/2007 10:27:44 AM
Comment:
Hi I am trying to use that with RegularExpressionValidator on ASP.Net 2.0 but it allwing 111 , aaa and 1a1a do you think i am missing something please


Title: AlphaNumeric with UnderScore
Name: Anshul Jaiswal
Date: 7/5/2007 2:49:36 AM
Comment:
\w* Note : Small w is used and if you use 'W' then it is for "not alphanumeric".


Title: Not quite
Name: Michael
Date: 4/29/2004 6:13:16 PM
Comment:
Chris- Your pattern works if he wants to allow the "_", if you want a shorter way to write what he has. Try this: ^[^\W_]+$


Title: ??? Obvious ???
Name: Chris
Date: 1/8/2004 7:51:10 PM
Comment:
Check this out!! ^\w+$


Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials