Help for this page

Select Code to Download


  1. or download this
    my $needle = 'mo4\dy13\hr19\\';
    my $haystack = '\yr2012\mo4\dy13\hr19\min23\sec51';
    ...
    $haystack =~ s/\Q$needle\E([^3]*3)/${needle}new/;
    
    print 'Final $haystack:', $haystack, "\n";