<p>I am consuming the Twitter API and want to convert all URLs to hyperlinks. </p>

<p>What is the most effective way you've come up with to do this?</p>

<p>from</p>

<pre><code>string myString = "This is my tweet check it out http://tinyurl.com/blah";
</code></pre>

<p>to</p>

<pre><code>This is my tweet check it out &lt;a href="http://tinyurl.com/blah"&gt;http://tinyurl.com/&gt;blah&lt;/a&gt;
</code></pre>

Regular expressions are probably your friend for this kind of task:
```
```
Regex r = new Regex(@"(https?://[^\s]+)");
myString = r.Replace(myString, "<a href=\"$1\">$1</a>");
```
```
The regular expression for matching URLs might need a bit of work.