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 ComaVN

Status: newassigned

comment:2 Changed 16 years ago by ComaVN

Resolution: fixed
Status: assignedclosed

(In [4867]) added test for unnamed groups (seems to work already?) closes #4146

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain ComaVN.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.