Using regular expression with strsubst, is there any way to substitute
multiple occurence of matched characters in a string? As my test code
below shows, replacement occurs multiple times when an ordinary string
is searched. But only the first occurence is replaced if regular
expression is used.
I am using ver. 5.3.3 and 5.4.0.
-->txt=msprintf("aaa\tbbb\tccc\tddd\n");
-->a=strsubst(txt,char(9),"*")
a =
aaa*bbb*ccc*ddd
-->b=strsubst(txt,"/\t/", "*", "r")
b =
aaa*bbb ccc ddd
-->c=strsubst(txt,"/\t/g", "*", "r")
c =
aaa*bbb ccc ddd
Iai
_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users