regex little question pls
If I have a regex like this:
Regex objAlphaNumericPattern = new Regex(">[ ]*[\\s]*[a-zA-Z0-9\x0600-\x06ff\x00DF]+[ ]*<");
and I want to include these 2 characters also to be take into consideration [ and ]
How do I specify them inside my regex
Thanks
Re: regex little question pls
Use the escape character \
\[
and
\]
Re: regex little question pls
Re: regex little question pls
Also, there is an escape function to do this automatically for you:
VB Code:
Dim myLiteralString As String = "Is this going to cause rx errors? I bet so. What is 1\6, or 5+1?"
Dim myRegexString As String = System.Text.RegularExpressions.Regex.Escape(myLiteralString)