This domain may be for sale!
NAME DESCRIPTION Part 1: The basics Simple word matching Using character classes Matching this or that Grouping things and hierarchical matching Extracting matches Matching repetitions Building a regexp Using regular expressions in Perl Part 2: Power tools More on characters, strings, and character classes Compiling and saving regular expressions Embedding comments and modifiers in a regular expre
弊社には、アンチ正規表現の人がいますが、私は熱烈な正規表現 Lover である。 大崎氏の「Perl 正規表現雑技」とかは、正規表現 Lover 垂涎のコンテンツとして、ブラウザのリンクバーに入れている程である (嘘)。 正規表現は覚えてモノにすれば、シアワセになれる素晴らしい仕組みなのです。 昨日、Shibuya.pm のテクニカルトークに行った際「はてなでは XML 系の CPAN モジュールはあまり使っておらず、XML の parse には殆んど正規表現を使用している」という話が出てきて、嬉しさのあまり身震いした。 parser を書くのが面倒臭くて「XML::Simple 最強」とかホザいた自分に対しての自戒と、弊社の Chief Regular Expressioner という肩書を持つ (自称) 立場の人間として、たまには、正規表現ゴリゴリなネタでも書いてみようかなと思いますた
2007年10月30日20:00 カテゴリLightweight Languages perl - 勝手に添削 - 40行で作るPerl用テンプレートエンジン 久々の勝手に添削。今回はこちら。 40行で作るPerl用テンプレートエンジン 正規表現がらみなので、Perl以外でも有用。 添削箇所は、こちら。 40行で作るPerl用テンプレートエンジン sub convert { return unless defined(my $str = shift); $str =~ s{&}{&}gso; $str =~ s{<}{<}gso; $str =~ s{>}{>}gso; $str =~ s{\"}{"}gso; $str; } これの最初のsubstitutionが&ではなくて&ではないかというのはさておき、こういった場合、何度も正規表現をかけ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く