Perl初心者スレ(マジレス回答) (523レス)
前次1-
抽出解除 レス栞

リロード規制です。10分ほどで解除するので、他のブラウザへ避難してください。
346
(1): デフォルトの名無しさん [sage] 2015/01/15(木)09:40 ID:+X0UBnJQ(2/2)
あ、 binmode STDIN , ":utf8": で
352: 349 [sage] 2015/01/19(月)22:36 ID:bxHKMq/8(1)
>>346
ヒント助かった。

use Encode qw/encode decode/;
my $enc = 'UTF-8';
sub d($) { decode($enc, shift) }
sub e($) { encode($enc, shift) }

my $seach_word = "日本語";

my $found_res = 0;
my $res    = "";

while (<>) {
  if (/^\d/x) {
    if ( $found_res == 1 ) {
      print $res;
      $found_res = 0;
    }
    $res = "";
  }
  else {
    my $seach_word_ = e$seach_word;
    if (/$seach_word_/x) {
      $found_res = 1;
    }
  }
  $res .= $_;
}
前次1-
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ AAサムネイル

ぬこの手 ぬこTOP 0.013s