How to detect an address or a postal code in a variable
<p>My questions sound may different but I am really looking for solution.</p>

<p>I have a variable in PHP, let's say <code>$check</code>, containing a string. It can be either an address or a postal code. Is there any rule we can apply here to check whether variable has postcode or address?</p>

<p>Edit: This website is for UK</p>

<p>Thanks</p>
