- var_dump: documentation ( source)
- preg_match: documentation ( source)
<?php
$string1 = "aaabchr";
$string2 = "qwntfschrprtkjs";
$regex = '/^(?:.(?!chr))*(?:[bcdfghjklmnpqrstvwxz](?!chr)){4}(?:.(?!chr))*$/i';
var_dump(
preg_match($regex, $string1),
preg_match($regex, $string2)
);