refactor: supports named captures like %r{/hello/(?<person>[^/?#]+)} in pattern_matching.rb
refactor: supports optional named captures like %r{/page(?<format>.[^/?#]+)?} in pattern_matching.rb