<?php $test = array('ahoj', 'blb', 'bla', 'blabla', '1_22x44','1_22x44a'); $pattern = '/^(?![0-9]_[0-9]*x[0-9]*$).+$/'; foreach ($test as $t) { echo $t.' : '.(preg_match($pattern, $t)?'yes':'no') ."\n\r"; }
You have javascript disabled. You will not be able to edit any code.