ok I have the following strings
"^[a-z]*$"
and
"a-z"
now what I want with those two strings is to check if they are valid Regular Expressions strings in VB.NET. I really have no idea how can I make it... but I tried something below
Try
Dim regex As Regex = New Regex("a-z")
Return "valid regex"
Catch ex As Exception
Return "not valid regex"
End Try
but my solution above seems not really good. Is there much better solution?