Help for this page

Select Code to Download


  1. or download this
    my $s = do {local $/=undef; <DATA>};
    while( $s =~ s#<span style="(font-weight: bold;|font-style: italic;|te
    +xt-decoration: underline;)">(?!.*?<span)(.*?)</span>#span2tag($1,$2)#
    +sgei ){};
    ...
    <span style="font-weight: bold;">test
      <span style="font-style: italic;">text</span>
      <span style="text-decoration: underline;">for</span> bolding</span>,
    + underlining and italicizing text.<br />
    
  2. or download this
    my $s = do {local $/=undef; <DATA>};
    while(1){
    ...
      $matched ||= $s =~ s#<span style="text-decoration: underline;">(?!.*
    +?<span)(.*?)</span>#<u>$1</u>#sgi;
      last unless $matched;
    }