Modify ↓
Opened 16 years ago
Closed 16 years ago
#4146 closed enhancement (fixed)
Allow unnamed capture groups in regex and urlg
Reported by: | ComaVN | Owned by: | ComaVN |
---|---|---|---|
Priority: | normal | Component: | RegexLinkPlugin |
Severity: | minor | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
Allow unnamed capture groups to be used in the regex and replacement url. All regexes used by trac and plugins for wiki-formatting are put into one big regex, meaning the numbering of unnamed groups is unpredictable.
It should be possible to use unnamed capture groups in the regex:
\bexample(\d+)\b
that can then be used for replacement in the url:
http://example.com/\1
or, when the replacement is followed by a digit:
http://example.com/\g<1>0
Attachments (0)
Change History (2)
comment:1 Changed 16 years ago by
Status: | new → assigned |
---|
comment:2 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
(In [4867]) added test for unnamed groups (seems to work already?) closes #4146