Unfortunately, at the moment, the search API does not have the ability to escape from tweet objects (i.e. links, mentions, hashtags), like some of the methods of the REST API. This way, you can either parse the entities yourself (I use regular expressions) or redirect back to the break API to get the entities.
If you decide to call back to the REST API and after you have extracted the status identifier from the API search results, you should make a statuses / show call as follows:
http://api.twitter.com/1/statuses/show/60183527282577408.json?include_entities=true
In the resulting JSON, notice the entity object.
"entities":{"urls":[{"expanded_url":null,"indices":[68,88],"url":"http:\/\/bit.ly\/gWZmaJ"}],"user_mentions":[],"hashtags":[{"text":"wordpress","indices":[89,99]}]}
You can use the above to find specific objects in a tweet (which occur between the line positions indicated by the index property) and convert them accordingly.
If you prefer to parse objects yourself, here are the regular expressions (.NET Framework) that I use:
Link Matching Template
(?:<\w+.*?>|[^=!:'"/]|^)((?:https?://|www\.)[-\w]+(?:\.[-\w]+)*(?::\d+)?(?:/(?:(?:[~\w\+%-]|(?:[,.;@:][^\s$]))+)?)*(?:\?[\w\+%&=.;:-]+)?(?:\#[\w\-\.]*)?)(?:\p{P}|\s|<|$)
Mention match pattern
\ B@ ([\w\d_]+)
Hashtag Compliance Template
(?:(?:^#|[\s\(\[]#(?!\d\s))(\w+(?:[_\-\.\+\/]\w+)*)+)
Twitter also provides an open source library that helps you grab Twitter-related objects such as links, mentions, and hashtags. This java file contains code that defines the regular expressions that Twitter uses, and this yml file contains the test strings and the expected results of many unit tests that use regular expressions in the Twitter library.
How you handle the tweet is up to you, however I process the copy of the original tweet and first take out all the links, replacing them in the copy with spaces (so as not to change the length of the string.) I capture the start and end locations of the match in the string along with the agreed content. Then I click the mentions, then the hashtags - again replacing them in the tweet copies with spaces.
This approach ensures that I do not find false positives for mentions and hashtags in any links in the tweet.