S
Simon Strandgaard
irb(main):001:0> /(?m)a*.a|b*.b/.match("0bab\nab1").to_a
=> ["0b"]
irb(main):002:0>
I would expect it to output "bab" !
=> ["0b"]
irb(main):002:0>
I would expect it to output "bab" !
Simon Strandgaard said:irb(main):001:0> /(?m)a*.a|b*.b/.match("0bab\nab1").to_a
=> ["0b"]
irb(main):002:0>
I would expect it to output "bab" !
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.