Re: Re: [PHP] preg_match_all problem

2004-11-01 Thread John Holmes
> From: "Ryan A" <[EMAIL PROTECTED]> > $content = str_replace($matches[$index][0],$value,$content); > > If you are interested in seeing the whole script, just scroll down. I'm not... but thanks. Did you read what I wrote? using preg_match twice and then str_replace is a waste. Learn to use preg_

Re: [PHP] preg_match_all problem

2004-11-01 Thread John Holmes
> From: "Ryan A" <[EMAIL PROTECTED]> > Below is my code for a templating kind of script, it basically searches for > 'tags' like this {movies 30} and replaces them, the problem is that if there > are 2 tags (eg: {movies 30}{movies 60}) it only replaces the first one...so > I tried using a preg_mat

Re: [PHP] Preg_match_all problem

2004-04-12 Thread John Nichel
John W. Holmes wrote: damn... i left out the ending delimiter, too.. :) Chalk one up to Monday. ;) -- *** * _ __ __ __ _ * John Nichel * * | |/ /___ __ \ \/ /__ _ _| |__ ___ __ ___ _ _

Re: [PHP] Preg_match_all problem

2004-04-12 Thread John W. Holmes
From: "John W. Holmes" <[EMAIL PROTECTED]> > From: "Jeff McKeon" <[EMAIL PROTECTED]> > > > Can anyone see why I'm getting this error message: > > > > "Warning: No ending delimiter '^' found in > > C:\Inetpub\wwwMIS_DEV\import_mvs.inc.php on line 126" > > > > From this line: > > > > if(preg_match_al

Re: [PHP] Preg_match_all problem

2004-04-12 Thread John W. Holmes
From: "Jeff McKeon" <[EMAIL PROTECTED]> > Can anyone see why I'm getting this error message: > > "Warning: No ending delimiter '^' found in > C:\Inetpub\wwwMIS_DEV\import_mvs.inc.php on line 126" > > From this line: > > if(preg_match_all("^([00])?.*$",$called,$found)) Because you do not have an e

Re: [PHP] Preg_match_all problem

2004-04-12 Thread John Nichel
Jeff McKeon wrote: Can anyone see why I'm getting this error message: "Warning: No ending delimiter '^' found in C:\Inetpub\wwwMIS_DEV\import_mvs.inc.php on line 126" From this line: if(preg_match_all("^([00])?.*$",$called,$found)) { substring($called,2,9); } I basi

Re: [PHP] preg_match_all problem

2002-10-10 Thread Archibald Zimonyi
> Hi, I'm a frog (french), > > I,ve some troubles with the preg_match_all function. > > > $strSearchWords = Trim($search); > $pattern = $strSearchWords; > > andwhile (!feof($openFile)) > { > $strFileContents .= fgets(