in reply to Re: Strange regexp behavior
in thread Strange regexp behavior

Yes, but this regexp is not bitten by that. It would be, if the author had used (").*\1 instead. If you write s/"[^"]+"/--/g then:

"word1" "word2"
"word1" "word2
"word1 "word2"

will become

-- --
-- "word2
--word2"

--
Alper Ersoy