以下の内容はhttps://tbpgr.hatenablog.com/entry/20120529/1338307276より取得しました。


書籍 Regular Expressions Cookbook | Insert the Regex Match into the Replacement Text

パンくず

書籍 Regular Expressions Cookbook
Insert the Regex Match into the Replacement Text

概要

マッチングした内容を後方参照で置換文字列内に埋め込む方法について

構文

マッチ内容全体を参照

\0

サンプル

URLをはてな記法のリンクにします。

# \Sは非空白文字。\0はマッチした文字列全体を取得
puts "http://google.com".gsub(/http:\S+/,'[\0:title=\0]')



以上の内容はhttps://tbpgr.hatenablog.com/entry/20120529/1338307276より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14