Re: reg-ex problem

From: Date: Thu, 08 Feb 2001 10:36:43 +0000
Subject: Re: reg-ex problem
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-38734@lists.php.net to get a copy of this message
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, besides matching something like > 'div2' it will also match div23 - both returning div2. Well, it matches on "div2", no matter what's around that. just like "prem" also matches on "appremoval" > Don't know the data, so it might not make any difference. Agreed -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offence. - Edsger W. Dijkstra

« previous php.general (#38734) next »