Help for this page

Select Code to Download


  1. or download this
    field1: valueA
    field2: valueB
    field3: valueC
    
  2. or download this
    field1: valueA
    some
    lines
    here
    field3: valueC
    
  3. or download this
    # this is quick
    my $no_field2 = "field1: valueA\nsome\nlines\nhere\nfield3: valueC\n";
    $no_field2 .= "........................................\n" x 1000;
    ...
    $has_field2 =~ s/(field1:.*?$)\n(?!^field2:)(.*$)\n(^field3:)
                    /$1\nfield2: valueB\n$3
                    /msx;