Modify

Opened 5 years ago

Closed 5 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 5 years ago by ComaVN

  • Status changed from new to assigned

comment:2 Changed 5 years ago by ComaVN

  • Resolution set to fixed
  • Status changed from assigned to closed

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

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from ComaVN. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.