使い慣れていないPerlでハマったのでメモ。 正規表現のパターンに変数を使ったとき、その変数の値が正規表現のメタ文字を含んでると正しく動かない。言われてみればその通りなんだけど、気づくのに30分近くかかった…。 quotemetaを使って事前にエスケープすれば解決。 $value = quotemeta( 'foo(bar)' ) ; if ( $text =~ /$value/ ) { print "OK.\n" ; }
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く