[#3109] Is divmod dangerous? — Dave Thomas <Dave@...>

14 messages 2000/06/06

[#3149] Retrieving the hostname and port in net/http — Roland Jesse <jesse@...>

Hi,

12 messages 2000/06/07

[#3222] Ruby coding standard? — Robert Feldt <feldt@...>

16 messages 2000/06/09

[#3277] Re: BUG or something? — Aleksi Niemel<aleksi.niemela@...>

> |I am new to Ruby and this brings up a question I have had

17 messages 2000/06/12
[#3281] Re: BUG or something? — Dave Thomas <Dave@...> 2000/06/12

Aleksi Niemel<aleksi.niemela@cinnober.com> writes:

[#3296] RE: about documentation — Aleksi Niemel<aleksi.niemela@...>

> I want to contribute to the ruby project in my spare time.

15 messages 2000/06/12

[#3407] Waffling between Python and Ruby — "Warren Postma" <embed@...>

I was looking at the Ruby editor/IDE for windows and was disappointed with

19 messages 2000/06/14

[#3410] Exercice: Translate into Ruby :-) — Jilani Khaldi <jilanik@...>

Hi All,

17 messages 2000/06/14

[#3415] Re: Waffling between Python and Ruby — Andrew Hunt <andy@...>

>Static typing..., hmm,...

11 messages 2000/06/14

[#3453] Re: Static Typing( Was: Waffling between Python and Ruby) — Andrew Hunt <andy@...>

32 messages 2000/06/16

[#3516] Deep copy? — Hugh Sasse Staff Elec Eng <hgs@...>

Given that I cannot overload =, how should I go about ensuring a deep

20 messages 2000/06/19

[#3694] Why it's quiet — hal9000@...

We are all busy learning the new language

26 messages 2000/06/29
[#3703] Re: Why it's quiet — "NAKAMURA, Hiroshi" <nahi@...> 2000/06/30

Hi,

[#3705] Re: Why it's quiet — matz@... (Yukihiro Matsumoto) 2000/06/30

Hi,

[ruby-talk:03307] Re: dev.rubycentral.com

From: Dave Thomas <Dave@...>
Date: 2000-06-12 15:40:04 UTC
List: ruby-talk #3307
Aleksi Niemel<aleksi.niemela@cinnober.com> writes:

> Dave's example for MatchData.[] 
> 
>   m = /(.)(.)(\{}d+)(\{}d)/.match("THX1138.")
> 
> returns nil on my Win (rbdj144) environment. I was wondering for a while why
> you have (\{}d+) and then I got it. Maybe it belongs to the same class as
> other Latex environments :). Haven't seen such regexp anyway.

Sorry about that - this LaTeX to html conversion is tough, but we'll
get the bugs out. Unfortunately we've having to do it ourselves - the
standard latex2html script chokes on much of our stuff.

> ruby> m=/(.)(.)(\d+)(\d)/.match("THX1138.")
> #<MatchingData:0x246a00>
> ruby> m[0]
> ""
> ruby> m[0,5]
> [nil]

That's a problem with using eval.rb.

Try typing it into a file and running it, or better yet, have a play
with irb:

     dave[ruby/sample 10:39:33] irb
     irb(main):001:0> m=/(.)(.)(\d+)(\d)/.match("THX1138.")
     #<MatchData:0x401c1e90>
     irb(main):002:0> m[0]
     "HX1138"
     irb(main):003:0> m[0,5]
     ["HX1138", "H", "X", "113", "8"]



Dave

In This Thread

Prev Next