php - Regular Expression - Negation String + OR -
i need match string not 11111 or 22222 (exact)
<?php $string = 'string' $pattern = '#patter#' // have 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 google , none of them work.
note: has pure regex , not negating function preg_match
Comments
Post a Comment