Help for this page

Select Code to Download


  1. or download this
    $str = "%tag1% went to %tag2% 
    #with
    $str = ~ s/\%(\S+)\%/$template{$1}/gi;
    
  2. or download this
    $str = "%tag1%ALONGSTRINGOFTEXT%tag2% 
    #with
    ...
    
    #would yield:
    #$str eq $template{"tag1%ALONGSTRINGOFTEXT%tag2"};