Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    
    ...
    $txt =~ s/\*(.*?)\*/<em>$1<\/em>/g;
    
    print $txt."\n";
    
  2. or download this
    s/ substitute
    \* a star
    ...
    / replace it with
    <em>$1<\/em> what we just got, surrounded by <em>'s
    /g; do this across the entire string;
    
  3. or download this
    foo <em>text* bar *bat</em> bounce
    - instead of -
    foo <em>text</em> bar <em>bat</em> bounce