Help for this page

Select Code to Download


  1. or download this
       my $code = qq(
          [head]
    ...
          $str =~ s#\[(.*?)\](.*?)(\[.*?\]|\n)#<div class="$1">$2</div>#ig
    +;
          print $str;
       }
    
  2. or download this
    $str =~ s#\[(.*?)\](.*?)(?=\[.*?\]|\n)#<div class="$1">$2</div>#ig;