Turn text matching a certain regex into a link


A disadvantage of using InterWiki to link to external pages is that the user has to put a prefix before the link, for example MeatBall:InterMapTxt.

In some cases, the actual text to be linked is distinctive enough to be turned into a link without many false positives. For example, TOPdesk service management software uses identifiers like '0811 123' for incidents. When text of this form occurs, it could be automatically rendered into a link to the relevant TOPdesk page.

This Trac plugin allows these kinds of links to be made with a minimum of configuration, based on a regex that matches the external identifiers.

For example, when adding the following to your trac.ini file:

regex1 = \b(?P<topdeskyymm>\d\d(?:0[1-9]|1[0-2])) (?P<topdesknr>\d{3})\b
url1 = http://topdesk/query=\g<topdeskyymm>%20\g<topdesknr>
regex2 = \bexample(?P<exampleid>\d+)\b
url2 =\g<exampleid>

then 0811 123 becomes 0811 123, and example123 becomes example123.

The topdesk url is fictitious, this is an example only.

Bugs/Feature Requests

Existing bugs and feature requests for RegexLinkPlugin are here.

If you have any issues, create a new ticket.


0 / 2


3 / 4


Download the zipped source for version 0.2 from here, or get the egg for Python 2.5 here.


You can check out RegexLinkPlugin from here using Subversion, or browse the source with Trac.

The trunk is where active development occurs (on Trac 0.11), tags contains released versions, and any development for other Trac versions occurs in the branches.


General instructions on installing Trac plugins can be found on the TracPlugins page.

Recent Changes

4969 by ComaVN on 2008-12-06 19:29:30
4870 by ComaVN on 2008-11-24 23:12:43
increased trunk version to 0.3
4869 by ComaVN on 2008-11-24 23:11:44
tagged 0.2 version


Author: ComaVN?
Maintainer: ComaVN?

Last modified 6 months ago Last modified on Oct 1, 2016, 8:58:56 PM