Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    use warnings;
    ...
    
    1 while $text =~ s{^((?:(?!<pre>).|<pre>(?:(?!</pre>).)*</pre>)*?)\n}{
    +$1<br/>}is;
    print $text;
    
  2. or download this
    <p>This is a line<br/>with a break.</p><pre>This is a pre
    with a break.</pre><p>This is a line<br/>with a break.</p><br/>
    
  3. or download this
    The regular expression:
    
    (?is-mx:^((?:(?!<pre>).|<pre>(?:(?!</pre>).)*</pre>)*?)\n)
    ...
    ----------------------------------------------------------------------
    )                        end of grouping
    ----------------------------------------------------------------------