<?php // Everything you enter here will be executed by our servers. Try it! $domain = "stackoverflow.com"; $uriToTest = "http://stackoverflow.com/"; $pattern = "/^http(s)?:\//(([a-z]+)\.)*".$domain."/"; echo preg_match($pattern, $uriToTest);
You have javascript disabled. You will not be able to edit any code.