From: Gavin Kistner Date: 2011-08-10T07:52:25+09:00 Subject: Re: Is \d supposed to match Unicode Numbers? --Boundary_(ID_tJX2J7ovY1HtH/EaYwTzXg) Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: quoted-printable On Aug 09, 2011, at 02:28 PM, Gavin Kistner wrote:=0AI pos= ted this as a question here:=0Ahttp://stackoverflow.com/questions/6998713/= scanning-for-unicode-numbers-in-a-string-with-d=0A=0ASummarized:=0AThe Oni= guruma docs[1] seem to say that \d is supposed to match the Unicode "Decim= al_Number" category. However, in Ruby 1.9.1 and 1.9.2 it only matches Lati= n 0-9 characters. Is this the correct behavior for Ruby? Are the Oniguruma= docs wrong? Am I misreading them? Do they not apply to how Oniguruma is u= sed within Ruby?=0A=0A[1]=A0http://www.geocities.jp/kosako3/oniguruma/doc/= RE.txt=0A=A0=0AIt seems that the above Oniguruma document is not directly = applicable to Ruby 1.9.=A0See this ticket discussion[2], which includes th= ese posts:=0A=0A[Yui NARUSE] "RE.txt is for original Oniguruma, not for Ru= by 1.9's regexp. We may need our own document."=A0=0A[Matz] "Our Oniguruma= is forked one. The original Oniguruma found in geocities.jp has not been = changed."=0A=0AThis discussion was from almost 2 years ago, but sadly I ha= ve not been able to find an official Ruby 1.9 version of RE.txt.=0A=0A[2]=A0= http://redmine.ruby-lang.org/issues/1889#note-28= --Boundary_(ID_tJX2J7ovY1HtH/EaYwTzXg) Content-type: multipart/related; boundary="Boundary_(ID_a++9f3TBKossrhrbhRIszQ)"; type="text/html" --Boundary_(ID_a++9f3TBKossrhrbhRIszQ) Content-type: text/html; CHARSET=US-ASCII Content-transfer-encoding: quoted-printable
On Aug 09, 2011, at 02:28 PM, Gavin Kistner <phrogz@me.com> wro= te:
I po= sted this as a question here:

Su= mmarized:
The Oniguruma docs[1] seem to say that \d is supposed = to match the Unicode "Decimal_Number" category. However, in Ruby 1.9.1 and= 1.9.2 it only matches Latin 0-9 characters. Is this the correct behavior = for Ruby? Are the Oniguruma docs wrong? Am I misreading them? Do they not = apply to how Oniguruma is used within Ruby?

[1] http://www.geocities.jp/kosako3/oniguruma/doc/RE.t= xt
 
It s= eems that the above Oniguruma document is not directly applicable to Ruby = 1.9. See this ticket discussion[2], which includes these posts= :

[Yui NARUSE] "RE.txt is for original= Oniguruma, not for Ruby 1.9's regexp. We may need our own document." = ;
[Matz] "Our Oniguruma is forked one. The original Oniguruma fo= und in geocities.jp has not been changed."

This d= iscussion was from almost 2 years ago, but sadly I have not been able to f= ind an official Ruby 1.9 version of RE.txt.

[2]&n= bsp;http://redmine.ruby-lang.org/issues/1889#note-28
= --Boundary_(ID_a++9f3TBKossrhrbhRIszQ)-- --Boundary_(ID_tJX2J7ovY1HtH/EaYwTzXg)--