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 |
|
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"