Error in the error logs..

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
turbo2ltr
Forum Commoner
Posts: 29
Joined: Sun Jul 18, 2004 4:08 pm

Error in the error logs..

Post by turbo2ltr »

I was looking at my sites error logs and found two recurring errors.

PHP Warning: No ending delimiter '/' found in /blah/search.php on line 102
PHP Warning: No ending delimiter '/' found in /blah/search.php on line 74

Code: Select all

//Line 102:

if (!preg_match ("/[^a-zA-Z0-9 +:-()]", $val))

// line 74


if (!preg_match ("/[^a-zA-Z0-9 +:-]", $val))
Unfortunatly regx are not something I'm good at. These two lines were probably hacked from an example until they worked the way I wanted them to...

So whats wrong with them?
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

Do as the error asks and add a / to the end of the regex.

Post the result after that...
Post Reply