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


書籍 Regular Expressions Cookbook | Match Previously Matched Text Again

パンくず

書籍 Regular Expressions Cookbook
Match Previously Matched Text Again

概要

前回一致した内容を再びマッチさせる方法について

構文

\b(\w)\1\b

サンプル

# 2文字の数値の繰り返しが出てきたら@に置換
pp "12age1212age1234age".gsub(/([\d]{2})\1/,"@") #=>"12age@age1234age"



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

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