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 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)) Although I doubt that'll work like you want it since [00] matches a zero, or another zero. It only matches one character. > I basically have a phone bill that sometimes has the phone number > preceeded by "00" and sometimes not. > > When it has the "00" I want to trim it with the substring command. I wouldn't even use preg for this. Just use ltrim() or if(substr($called,0,2)=='00')... ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php