my $find = '\\d{2}-\\d{2}-\\d{4}'; my $replace = '{date}'; s/$find/$replace/