Project

General

Profile

Actions

Feature #1201

closed

Add relative group reference in back reference with nest level in regular expressions (e.g. \k<-5+1>)

Added by WoNaDo (Wolfgang Nádasi-Donner) almost 16 years ago. Updated almost 13 years ago.

Status:
Closed
Target version:
[ruby-core:22416]

Description

=begin
It should be possible to use relative group references in back reference with nest level.

Reason: As named in Ticket 1200 relative group references can be very helpful in writing subexpessions, which can be used later on as often as necessary in one regular expression.

Unfortunately back references with nest level, \k<n+level>, \k, \k'n+level', and \k'n-level', do not allow relative group referencing, so they can only be used if one knows, how many normal groups are in the complete regular expression before the referenced group.

If there are relative group references possible, e.g. \k<-n+level>, \k<-n-level>, \k'-n+level', and \k'-n-level', these constructs can be used in subexpressions designed to be used more than once in a regular expression.
=end


Related issues 1 (0 open1 closed)

Related to Ruby master - Feature #1200: Possibility for using named and normal groups together in regular expressionsRejected02/25/2009Actions
Actions #1

Updated by naruse (Yui NARUSE) over 15 years ago

=begin
This feature depends on oniguruma.
=end

Actions #2

Updated by marcandre (Marc-Andre Lafortune) over 15 years ago

  • Assignee set to matz (Yukihiro Matsumoto)
  • Target version changed from 1.9.1 to 2.0.0

=begin

=end

Actions #3

Updated by shyouhei (Shyouhei Urabe) over 14 years ago

  • Status changed from Open to Assigned

=begin

=end

Updated by naruse (Yui NARUSE) almost 13 years ago

  • Status changed from Assigned to Closed

Ruby 1.9.1 supports this through Oniguruma 5.9.1.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0