- var_dump: documentation ( source)
- preg_match: documentation ( source)
<?php
$ClientAddress = "5 street name\n35230 Village";
$match=null;
$AdOk = preg_match("/^([0-9a-zA-Z-, '\\n]+)(\\d{5})([, ]+)([0-9a-zA-Z-, '\\n]+)$/iu", $ClientAddress, $match);
var_dump($ClientAddress, $AdOk, $match);
?>