Re: reg-ex problem

From: Date: Wed, 07 Feb 2001 20:50:28 +0000
Subject: Re: reg-ex problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-38606@lists.php.net to get a copy of this message
> } > elseif( preg_match( "/^\d+$/", $arg[$i], $matches ) ) Isn't this \d+ matching ----------^ > { > $value = $matches[0]; > } > elseif( preg_match( "/(div\d|prem)/", $arg[$i], $matches ) ) the \d in this-----------------^------------^ And the | is using '\d' and 'prem'. It probably should be "/(div\d)|prem/ Unless those parens are part of the expression. Then maybe "/\((div\d)|prem\)/" MD

« previous php.general (#38606) next »