Checking strings are alphanumeric

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Oenone

    Checking strings are alphanumeric

    Is there a nice .NET framework function that will allow me to easily check
    if a string contains only alphanumeric characters?

    Or is the only way to loop through the characters, checking each one
    individually?

    TIA,

    --

    (O)enone


  • Herfried K. Wagner [MVP]

    #2
    Re: Checking strings are alphanumeric

    "Oenone" <oenone@nowhere .com> schrieb:[color=blue]
    > Is there a nice .NET framework function that will allow me to easily check
    > if a string contains only alphanumeric characters?
    >
    > Or is the only way to loop through the characters, checking each one
    > individually?[/color]


    Check out the 'Like' operator and/or
    'System.Text.Re gularExpression s.IsMatch'.

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://classicvb.org/petition/>

    Comment

    Working...