M
Manoj P M
Hi,
A Simple question on regular expression in ruby. Some can make me
understand the below code snippets. I was under the impression that
both these statement would give the same answer. But it doesnt. Why ?
irb(main):001:0> 'banana' =~ /(an)*/
=> 0
irb(main):002:0> 'banana' =~ /(an)+/
=> 1
-Manjo
A Simple question on regular expression in ruby. Some can make me
understand the below code snippets. I was under the impression that
both these statement would give the same answer. But it doesnt. Why ?
irb(main):001:0> 'banana' =~ /(an)*/
=> 0
irb(main):002:0> 'banana' =~ /(an)+/
=> 1
-Manjo