Monday, March 15, 2010

REGEX: Hostname

<?php
$hostname = '/([a-zA-Z0-9\.\-\_](?:[a-zA-Z0-9\.\-\_]*[a-zA-Z0-9]))/i';
?>