|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
only letters or numbershey all,
given a string, if i only wanted to get only letters and number (no symbols) is there a function to do this? i.e. "Los Angeles, CA" i don't want the comma. thanks, rodchar Hi,
Use a regular expression. Dim regText As New System.Text.RegularExpressions.Regex("^[a-zA-Z0-9]+$ ") Trace.WriteLine(regText.IsMatch("Los Angeles, CA")) http://regexlib.com/Search.aspx?k=alphanumeric Ken --------------- Show quoteHide quote "rodchar" <rodc***@discussions.microsoft.com> wrote in message news:7E732089-2285-4057-887A-DD86A729FABF@microsoft.com... > hey all, > > given a string, if i only wanted to get only letters and number (no > symbols) > is there a function to do this? > i.e. > "Los Angeles, CA" > i don't want the comma. > > thanks, > rodchar |
|||||||||||||||||||||||