From: "Wolfgang Nádasi-Donner" Date: 2007-02-03T18:25:05+09:00 Subject: Re: Named groups in regexp matches? Paddy3118 schrieb: > On Jan 29, 10:14 pm, Wolfgang N�dasi-Donner >> irb(main):001:0> md="abba".match(/(?.)(?.)\k\k/) > Hi Wolfgang, > I was going to ask why you did not use the syntax of (?P...) as > used in Python, but found that, according to http://www.amk.ca/python/ > howto/regex/regex.html#SECTION000530000000000000000, the P is for > Python extensions. It's not that easy. The regular expression engine used in Ruby 1.9 is not integral part or ruby. It is a stand alone regular expression engine called "Oniguruma" (http://www.geocities.jp/kosako3/oniguruma/). Oniguruma is actually existent in tree variants, "2.x.y" can be used in Ruby 1.6 and 1.8, but it is not the standard engine of Ruby 1.6/1.8, "4.x.y" will be used in Ruby 1.9ff, and "5.x.y" is not related to Ruby. The syntax of the regular expressions are not defined by Ruby, they are defined by Oniguruma. Wolfgang N�dasi-Donner