Maxscript - find & replace undefinded "string"


Is there a way to find an undefined “name” and replace it with a “new name.” with maxscript?

x = “today is a beautiful saturday”
replace “saturday” to “monady”
x = “today is a beautiful monday”


Check maxscript reference for substituteString.

substituteString <source_string> <from_string> <to_string> Returns a new string with all occurrences of <from_string> in <source_string> replaced with <to_string>. Available in 3ds Max 2008 and higher. Previously, available in the Avguard Extensions. 

s1 = "Truth, Justice And The American Way"
s2 = "The American Way"
s3 = "All That Stuff"
s4 = substituteString s1 s2 s3
"Truth, Justice And All That Stuff"


use dotnet and regular expression.


Thanks for the reply miauu. Will try it.


What is dotnet?