How to Parse Twitter Usernames, Hashtags and URLs in C# 3.0
06 May 2009
Lately I’ve been working on my side project called Twime. So as part of that project, I wanted to add the ability to parse URLs, usernames and hashtags from the user’s Twitter timeline. Here’s how I went about doing that:
Just be sure to call ParseURL method before ParseUsername and ParseHashtag. The other two methods will add URLs to the usernames and hashtags and you don’t want ParseURL to confuse those links with the original links present in the text.