タグ

関連タグで絞り込む (1)

タグの絞り込みを解除

正規表現に関するkiryuuのブックマーク (2)

  • quotemeta関数 - 正規表現文字のエスケープ - Perl入門ゼミ

    Perl › 関数 › here quotemeta関数を使用すると、正規表現で利用される文字列を通常の文字として扱うことができます。ワード文字以外のすべての文字の直前に\がつけられます。 # 正規表現文字列を通常の文字として扱う $ret = quotemeta $str; 正規表現文字を含んだ文字列を通常の文字列としてパターンマッチさせるサンプルです。 # 正規表現文字を含んだ文字列を通常の文字列としてパターンマッチ my $message = 'This message contains a{2}'; my $match = "a{2}"; $match = quotemeta $match; if ($message =~ /$match/) { print "Match!\n"; } quotemetaは正規表現の特殊文字である\Qと同じ意味を持ちます。上記のquotemetaは

    quotemeta関数 - 正規表現文字のエスケープ - Perl入門ゼミ
  • gkbr.me

    このドメインを購入する。 gkbr.me 2018 Copyright. All Rights Reserved. The Sponsored Listings displayed above are served automatically by a third party. Neither the service provider nor the domain owner maintain any relationship with the advertisers. In case of trademark issues please contact the domain owner directly (contact information can be found in whois). Privacy Policy

  • 1