preg_match is faster than the strspan with strlen