We work with bugzilla. Whenever you need to query a ticket you just need to know the bugid (integer) and you simply prepend this to it.

```
http://<bugzilla_server>/bugzilla/show_bug.cgi?id=<bug_id>

```

Suppose I have a bug link which looks like this [777](http://bugzilla_server/bugzilla/show_bug.cgi?id=bug_id). If I select and copy this it is preserved on the pasteboard so when I paste this into mail it will correctly preserve the link and it's attributes.

What I am looking for is to simple type '777' select it and run an applescript on it and replace it with a link like the one above. Can anyone help me out??