I have to select rows that contain the word one
and not another
. The rows come form some json string, like those:
{"Name" : "one", "LastError" : "No error", "ID" : 1000 , "Comment" : "no comment"} //YES
{"Name" : "one", "LastError" : "No error", "ID" : 1000 , "Comment" : "another"} //NO because there is 'one' and 'another'
I am using php and preg_match.
I'am trying to use someting like:
if (preg_match('/one.*(?!another)/i',$row_string) > 0)
{
//no draw
}
else
{
//Draw something
}
It seems that the look ahead doesn't do anything.