J
Joel VanderWerf
Fantasy for the day...
str = "foo bar"
x, y = str[/(foo) (bar)/, 1, 2]
x # ==> "foo"
y # ==> "bar"
Oh, well, there is always this:
(x, y), = str.scan(/(foo) (bar)/)
str = "foo bar"
x, y = str[/(foo) (bar)/, 1, 2]
x # ==> "foo"
y # ==> "bar"
Oh, well, there is always this:
(x, y), = str.scan(/(foo) (bar)/)