Oh nevermind, it's not such a big deal after all, here's the function
that I came up with:

def enlivenLink(desc):
    import re
    q = 'http://\w+.*[^\s]'
    res = desc
    alreadyfound = dict()
    for m in re.finditer(q, desc):
        s = desc[m.start():m.end()]
        if alreadyfound.get(s) == None:
            alreadyfound[s] = True
            res = re.sub(s, '<a target="_blank" href="%s">%s</a>' %
(s,s), res)
    return res

Cheers,
Will


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to