c# regex.ismatch using a variable
<p>I have the following code which works fine but i need to replace the site address with a variable...</p>

<pre><code>string url = HttpContext.Current.Request.Url.AbsoluteUri;  // Get the URL

bool match = Regex.IsMatch(url, @"(^|\s)http://www.mywebsite.co.uk/index.aspx(\s|$)");
</code></pre>

<p>I have tried the following but it doesn't work, any ideas???</p>

<pre><code>string url = HttpContext.Current.Request.Url.AbsoluteUri;  // Get the URL
string myurl = "http://www.mywebsite.co.uk/index.aspx";

bool match = Regex.IsMatch(url, @"(^|\s)"+myurl+"(\s|$)");
</code></pre>
