<?php $s = "Example of valid matches: NE1, NE17, NE49 Invalid matches: NE61, NE70"; if (preg_match_all('~\bNE(?!(?:6[1-9]|7[01])\b)\d{1,2}\b~', $s, $matches)) { print_r($matches[0]); }
You have javascript disabled. You will not be able to edit any code.