preq_replace href value only if there string x is not found in it : i have a problem with the following situation

i want to replace the href value with preg_replace and dont know how

i got 3 types of links

    1:<a href="http://www.something.com"></a>
    2:<a href="smartlink:webview-something"></a>
    3:<a href="link/to/something"></a>
i want to add the domain on link 3 (http://www.something.com/link/to/something)
but 1 and 2 should stay untouched.

how can i do that?

kind regards

martin 