MuruganAD.com
Murugan Andezuthu Dharmaratnam

  |  HOME   |  BLOG   |  DISCUSSION FORUM   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  



VB NET Remove all non alphanumeric characters using regular expression regex

Home    ASP .NET    VB NET Remove all non alphanumeric characters

VB .NET Remove all non alphanumeric characters can be done easily using regular expression. 
I found it easiest to use regular expression for this, 

System.Text.RegularExpressions.Regex.Replace(stringtochange, "[^a-zA-Z0-9_ .+]", "")

At the end of expression I have added "_ .+" this is just to include these 
characters space + . and _ so that they are not replaced 
with "". 




  |  HOME   |  BLOG   |  DISCUSSION FORUM   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  

Copyright 2009 @ Murugan Andezuthu Dharmaratnam