S
Sarah Allen
Looking at the MatchData docs:
http://ruby-doc.org/core/classes/MatchData.html#M001278
It looks like I should be able to get an array from .captures with every
match. I swear I've done this before, but I was teaching a class today
and couldn't figure out what's going on in this simple example... maybe
I typed something wrong and just need another pair of eyes.
$ irb=> ["word1"]
testing the same string and expression in http://www.rubular.com yields
two matches
$ ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9.7.0]
Can anyone give me a clue?
Thanks in advance,
Sarah
http://ruby-doc.org/core/classes/MatchData.html#M001278
It looks like I should be able to get an array from .captures with every
match. I swear I've done this before, but I was teaching a class today
and couldn't figure out what's going on in this simple example... maybe
I typed something wrong and just need another pair of eyes.
$ irb=> ["word1"]
testing the same string and expression in http://www.rubular.com yields
two matches
$ ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9.7.0]
Can anyone give me a clue?
Thanks in advance,
Sarah