<?php $pattern = '/^([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*[\/\\\\]?)*[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/D'; $class = 'Foo'; var_dump(preg_match($pattern, $class));
You have javascript disabled. You will not be able to edit any code.