- preg_match: documentation ( source)
- print_r: documentation ( source)
<?php
$test = "case ( 'this_is__test_innit'):";
if (!preg_match('/case[\s]*?\([\s]*?[\'|\"]/', $test, $matches)) {
print 'no match';
} else {
print_r( $matches);
}