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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
([^a-zA-Z0-9])
Description
(Corrected) This pattern will match 1 instance of a NON-alphanumeric character. This is very handy to use when y ou want to filter input only by alphanumeric characters, by using Regex.Replace. However, when used in a Regex.Replace, it will replace all instances of non-alphanumeric characters with specified character.
Matches
Test! | This will match | H3llo$
Non-Matches
Test | Thiswillnotmatch | H3llo
Author Rating: Not yet rated. Shane Sukul
Source
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: .Net Consultant/Architect
Name: Shane Sukul
Date: 8/2/2005 8:37:54 PM
Comment:
(Corrected) This pattern will match 1 instance of a NON-alphanumeric character. This is very handy to use when you want to filter input only by alphanumeric characters, by using Regex.Replace. However, when used in a Regex.Replace, it will replace all instances of non-alphanumeric characters with specified character. Regards Shane Sukul |Bsc|Mcsd.Net|Mcsd|Mcad|


Title: Doesn't do as described
Name: Randal L. Schwartz
Date: 8/2/2005 7:36:17 PM
Comment:
match 1 or more instances vs [^a-zA-Z0-9] That character class is exactly one... not "one or more"


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