strsubst() only replace the first occurence found if the pattern to search is a
Reported by Pierre MARECHAL
-- Bug description --
strsubst() only replace the first occurence found if the pattern to search is a regular expression. This is not the case witout the regexp mode.
Pierre
-- Scilab error message --
-->strsubst("pattern -- pattern __ pattern ","/pattern/","replace","r")
ans =
replace -- pattern __ pattern
-->strsubst("pattern -- pattern __ pattern ","pattern","replace")
ans =
replace -- replace __ replace
-- How to reproduce the bug --
strsubst("pattern -- pattern __ pattern ","/pattern/","replace","r")