need to verify a string against reg exp. to allow only characters and apostrophe and hyphen
using :
========
Function RegExpValidate( sInput,sPattern ) as boolean
Dim RegexObj as Regex = New Regex("regulare xpression")
return Regex.IsMatch(s Input,sPattern)
End Function
calling with:
==============
RegExpValidate( MyString,"[a-zA-Z'-]")
but pattern isn't working. any help ???
using :
========
Function RegExpValidate( sInput,sPattern ) as boolean
Dim RegexObj as Regex = New Regex("regulare xpression")
return Regex.IsMatch(s Input,sPattern)
End Function
calling with:
==============
RegExpValidate( MyString,"[a-zA-Z'-]")
but pattern isn't working. any help ???
Comment