Sql select url regex
<p>So I have to find the urls which contains the word 'foo' for example . I want to do this with a regex like <code>SELECT * FROM table WHERE url = regex</code>. The url is <code>https//...</code> OR <code>http://....</code> and I need to find the word <code>foo</code> for example in the url. What I actually want is a regex which will check if <code>foo</code> is in the hostname or in the path. Thanks for help!</p>

<p><strong>EDIT :</strong></p>

<p>I want to find a faster alternative with regex because <code>LIKE '%foo%'</code> is very slow on my table.</p>