パンくず
書籍 Regular Expressions Cookbook
Find All Except a Specific Word
概要
特定の単語を除く単語のマッチングについて
サンプル
print "dog cat tiger catfish".scan(/\b(?!cat\b)\w+/)
出力
["dog", "tiger", "catfish"]
書籍 Regular Expressions Cookbook
Find All Except a Specific Word
特定の単語を除く単語のマッチングについて
print "dog cat tiger catfish".scan(/\b(?!cat\b)\w+/)
["dog", "tiger", "catfish"]