s = 'hello'
if s =~ /(?<mygroup>he)/
if m = s.match(/(?<mygroup>he)/)
puts mygroup # => NameError: undefined local variable or method `mygroup' for main:Object
puts m[:mygroup]
end