This code:
string1 = "I will drill for a well in walla walla washington."
/(w.ll) /.match(string1)
is returning only will.
Shouldn’t it be returning will and well also?
Check: http://rubular.com/r/48K8o5mzUX
How do I get multiple groups for a regex in Ruby?
It’s working fine and it’s the expected behaviour. Probably you want to use scan, like in the following: