how to check particular value start with string or digit. here i attached my code. am getting error to like idendifier expected.
code
----
Dim i As String
dim ReturnValue as boolean
i = 400087
Dim s_str As String = i.Substring(0, 1)
Dim regex As Regex = New Regex([(a - z)(A-Z)])
ReturnValue = Regex.IsMatch(s_str, Regex)
error
regx is type and cant be used as an expression
Your variable is
regex,Regexis the type of the variable.So it is:
But your regex is also flawed.
[(a - z)(A-Z)]is creating a character class that does exactly match the characters()-az, the rangeA-Zand a space and nothing else.It looks to me as if you want to match letters. For that just use
\p{L}that is a Unicode property that would match any character that is a letter in any language.