Help for this page
key:<date>([A-Z&;][a-z&;]+), ([0-9]{2}) ([0-9]{4})</date> value:<month>$1</month>
$instr = '<date>Jan, 10 1997</date>'; for my $pat (keys %patt1) ... $instr =~ s|$pat|$patt1{$pat}|egs;#this is not working $instr =~ s|$pat|<month>$1</month>|gs;#this works }