preg_match(): Unknown modifier problem
Posted: Mon Jul 27, 2009 8:57 am
I have this code (a small piece of a total):
I check a string with these values as following:
As output I get:
...
SharpReader[ /]([0-9.]{1,10})
Warning: preg_match(): Unknown modifier 'p' in value.class.php on line 39
sherlock_spider
...
What am I doing wrong? I don't see it... I don't get this error with every line (I mean every $_getwebbot['']=) but just with specific items like sherlock_spider...
Code: Select all
<?
//...
$_getwebbot['SharpReader'] = "SharpReader[ /]([0-9.]{1,10})";
$_getwebbot['SherlockSpider'] = "sherlock_spider";
//...
?>I check a string with these values as following:
Code: Select all
<?
while(list($name,$ereg) = each($_getwebbot)){
if(preg_match('_'.$ereg.'_', $user_agent)){
$webbot = $name;
break;
}
echo "<br>".$ereg;
}?>As output I get:
...
SharpReader[ /]([0-9.]{1,10})
Warning: preg_match(): Unknown modifier 'p' in value.class.php on line 39
sherlock_spider
...
What am I doing wrong? I don't see it... I don't get this error with every line (I mean every $_getwebbot['']=) but just with specific items like sherlock_spider...