Re: [PHP] reg-ex problem

2001-02-08 Thread Christian Reiniger
On Thursday 08 February 2001 07:40, Michael Dearman wrote: > > > And the | is using '\d' and 'prem'. It probably should be > > > "/(div\d)|prem/ Unless those parens are part of the expression. > > > Then > > And after a second look, yea the \d is tightly bound to the div. > But in confirming this,

Re: [PHP] reg-ex problem

2001-02-07 Thread Michael Dearman
Christian Reiniger wrote: > > On Wednesday 07 February 2001 21:50, Michael Dearman wrote: > > > } > > > elseif( preg_match( "/^\d+$/", $arg[$i], $matches ) ) > > > > Isn't this \d+ matching --^ > > > > > { > > > $value = $matches[0]; > > >

Re: [PHP] reg-ex problem

2001-02-07 Thread Christian Reiniger
On Wednesday 07 February 2001 21:50, Michael Dearman wrote: > > } > > elseif( preg_match( "/^\d+$/", $arg[$i], $matches ) ) > > Isn't this \d+ matching --^ > > > { > > $value = $matches[0]; > > } > > elseif( preg_match( "/(div\d|prem)

Re: [PHP] reg-ex problem

2001-02-07 Thread Michael Dearman
> } > 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-^^

Re: [PHP] reg-ex problem

2001-02-07 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Lee Stretton) wrote: > elseif( preg_match( "/^[a-zA-Z]+$/", $arg[$i], $matches ) ) > elseif( preg_match( "/(div\d|prem)/", $arg[$i], $matches ) ) > The first 3 work fine, but the last one "/(div\d|prem)/" doesnt work > proper