<?php $string = "-paint, old 12"; if (preg_match('~\bpaint,\s+old\s+(1[0-4]|[1-9])(?!\d)~', $string)) { echo "There is a match!"; } else { echo "There is no match!"; }
You have javascript disabled. You will not be able to edit any code.