I need to match string that are not 11111 OR 22222 (EXACT)
<?php
$string = 'STRING'
$pattern = '#PATTER#' // what I have to find
echo preg_match($pattern, $string) ? 'match' : 'no match';
Cases:
$string = '33333';// match
$string = '222222';// match
$string = '11111';// no match
$string = '22222';// no match
I tried many patters that I google and none of them work.
NOTE: It has to be pure REGEX and NOT negating the function preg_match
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments