Help for this page

Select Code to Download


  1. or download this
    $orgtext = Whey; # this one right here
    $newtext = Popcorn;
    
  2. or download this
    $orgtext = /[Ww]hey/; # this one right here
    $newtext = Popcorn;
    
  3. or download this
    $orgtext = ( $_ =~ /[Ww]hey/ );
    
  4. or download this
    $orgtext = qr/[Wwhey]/;
    
  5. or download this
    $orgtext = /<form[.*]?*\/form>/; # this one right here $newtext = bloc
    +k;
    
  6. or download this
    $orgtext = qr/<form.*?\/form>/sg; # s is needed so that "." matches ne
    +wline
    
  7. or download this
    $intext =~ s/$orgtext/$newtext/ms;
    # the ms is for coping correctly with newlines (that can easily appear
    + in a binary).
    ...
    # replaces ALL occurrences of orgtext with newtext and places the numb
    +er of occurences in $count