Hi all, please could you give me some help with this regular expression?
I am (trying) using preg_match to see if there are any illegal operators in a string but think I may be using the regular expression wrong
but i obviously don’t want words like Andrea, ordinance to show up
A problem with no solution is a problem viewed from the wrong angle
I am (trying) using preg_match to see if there are any illegal operators in a string but think I may be using the regular expression wrong
Code:
$pattern = '^["/OR/"]| ["/AND/"]|["/And/"]| ["/\+/"]|["/\&/"]|["/\'/"]| ["/#/"]$';
$badOper = preg_match($pattern, $strToCheck);
but i obviously don’t want words like Andrea, ordinance to show up
A problem with no solution is a problem viewed from the wrong angle