Hi!
Can someone pelase help me to convert the following Vbscript code to PHP, i am really sucky at Regular Expression:
---------CODE VBSCRIPT---------------------
Function IsValid(strData,blIncludeAlpha,blIncludeNumeric)
Dim regEx, retVal,strPtrn
Set regEx = New RegExp
If blIncludeAlpha Then
strPtrn="a-zA-Z"
End If
If blIncludeNumeric Then
strPtrn="0-9"
End If
if blIncludeAlpha and blIncludeNumeric Then
strPtrn="a-zA-Z0-9"
End if
regEx.Pattern = "^[" & strPtrn & "]+$"
IsValid= regEx.Test(strData)
End Function
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php