Please help on multiple match replacement
- by duenguyen
I have a perl code:
my $s = "The+quick+brown+fox+jumps+over+the+lazy+dog+that+is+my+dog";
what I want is to replace every + with space and dog with cat
i have this regular expression
$s =~ s/+(.*)dog/ ${1}cat/g;
But it only match first occurrence of + and last dog.
Please help