I want to test that a given string does not belong to the following group of strings: 22 75.
Could anyone please tell why PHP\'s preg_match(\"/[^(22|75)]/\
preg_match(\"/[^(22|75)]/\
Your regex is asking "does the string contain a character that is not (, 2, 7, 5, | or )?"
(
2
7
5
|
)
This is obviously not what you want.
Try this:
if( !in_array("25", array("22","75")))