I am familiar with pcre more then php's POSIX extension :)
and it is said that preg_match() is faster than ereg(), see php manual
for more info :)
function isValid($strData, $bIncludeAlpha=false, $bIncludeNumber=false)
{
switch(true) {
case $bIncludeAlpha && !$bIncludeNumber:
Ni Shurong wrote:
I did not test it:)
function isValid($strData, $bIncludeAlpha=false, $bIncludeNumber=false)
{
switch(true) {
case $bIncludeAlpha && !$bIncludeNumber:
$ptr = "/^[a-zA-Z]+/";
break;
case !$bIncludeAlpha && $bIncludeNumber:
$ptr
Jason Wong wrote:
On Thursday 29 July 2004 17:00, Jay wrote:
Can someone pelase help me to convert the following Vbscript code to
PHP, i am really sucky at Regular Expression:
Why don't you state your problem in English so that even those people not
familiar with VB will understand and thus may
On 29 July 2004 10:00, Jay wrote:
> 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
>
I did not test it:)
function isValid($strData, $bIncludeAlpha=false, $bIncludeNumber=false)
{
switch(true) {
case $bIncludeAlpha && !$bIncludeNumber:
$ptr = "/^[a-zA-Z]+/";
break;
case !$bIncludeAlpha && $bIncludeNumber:
$ptr = "/^[0-9]+/";
On Thursday 29 July 2004 17:00, Jay wrote:
> Can someone pelase help me to convert the following Vbscript code to
> PHP, i am really sucky at Regular Expression:
Why don't you state your problem in English so that even those people not
familiar with VB will understand and thus may be able to hel
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
strPt
7 matches
Mail list logo