Re: Preg_match_all problem

From: Date: Mon, 12 Apr 2004 16:16:25 +0000
Subject: Re: Preg_match_all problem
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-183170@lists.php.net to get a copy of this message
From: "John W. Holmes" <holmes072000@charter.net> > From: "Jeff McKeon" <jmckeon@telaurus.com> > > > 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 ending delimiter. In fact, you don't have a > starting delimiter, either, but preg assumes you meant the ^ character to be > your delimiter. > > This is explained in all of the examples in the manual, but you must > surround your regular expression by a delimiter such as the / or # > character. This is because you can include modifiers after the delimiters to > further create your regex. > > if(preg_match_all("/^([00])?.*$",$called,$found)) damn... i left out the ending delimiter, too.. :) if(preg_match_all("/^([00])?.*$/",$called,$found)) ---John Holmes...

« previous php.general (#183170) next »