Tbpgr Blog

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

書籍 Regular Expressions Cookbook | Find a Specific Word

パンくず

書籍 Regular Expressions Cookbook
Find a Specific Word

概要

単語のマッチングについて

構文

/bword/b

サンプル

puts "My name is hoge.Your name is hoge too.".scan(/\bhoge\b/)

出力

hoge
hoge