Multiline Regexps

C

Ceri Storey

Either this is a bug, or I'm missing something:

irb(main):001:0> /^[aeiou]/.match("foo\noooh")
=> #<MatchData:0x81d588c>
irb(main):002:0> /^[aeiou]/m.match("foo\noooh")
=> #<MatchData:0x81d2cf4>

Shouldn't the second one return nil?

ruby 1.8.1 (2003-12-03) [i386-netbsdelf]

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
474,142
Messages
2,570,818
Members
47,362
Latest member
eitamoro

Latest Threads

Top