This blog is part of our Ruby 2.4 series.
We can use
MatchData# to extract named capture and positional capture
Positional capture groups could also be extracted using
Changes in Ruby 2.4
In Ruby 2.4, we can pass string or symbol to extract named capture groups