title: PHP REGEX match a domain name from a given Url
body: <p>What i want is given domain is present in string or not.</p>
  
  <p>examples are of my problem are</p>
  
  <pre><code>+----------------------------------------------+-----------------------+
  | input                                        | output                |
  +----------------------------------------------+-----------------------+
  | http://www.example.com/questions/ask         | match or true         |
  | http://example.com/check                     | match or true         |
  | http://www.google.com/ig/moduleurl           |
  |    =http%3A%2F%2Fwww.example.com%2Fquestion  | false                 |
  | http://example.com/search/%25C3%25A9t%25     | match true            |
  +----------------------------------------------+-----------------------+
  </code></pre>
  
  <p>any help will be appreciable</p>
  
  <p>Thanks</p>