Negate the characters in the character class
<? if ( preg_match("/[^a-z347]+/","AB asdf123123asdf", $array) ) { print "<pre>\n"; print_r( $array ); print "</pre>\n"; } ?>