In the VBScript code, I am trying to disallowed Non-English characters. I have created a below function to validate the input value:
Function Valid(ByVal value)
'instantiate regex object container, output boolean '
Dim objRegEx, retVal
'using late binding, VBScript reference is not required '
Set objRegEx = CreateObject("VBScript.RegExp")
'.pattern
With objRegEx
.Pattern = "/[^\x00-\x7F]+/"
.IgnoreCase = True
.Global = True
End With
retVal = objRegEx.Test(value)
'get rid of RegEx object '
Set objRegEx = Nothing
Valid = retVal
End Function
But /[^\x00-\x7F]+/
expressions is not working.
What expressions do I need to add to validate the string?