Tbpgr Blog

Employee Experience Engineer tbpgr(てぃーびー) のブログ

2014-11-27から1日間の記事一覧

Ruby | Regexp | named_captures

概要 Regexp#named_captures 詳細 正規表現に含まれる名前付きキャプチャ(named capture)の情報を Hash で返却。 Hash のキーは名前付きキャプチャの名前で、値は index のリストを返却。 サンプルコード require 'tbpgr_utils' bulk_puts_eval binding, <<-…