Notifications
Clear all
[Closed] Maxscript – find & replace undefinded "string"
Nov 23, 2019 12:27 pm
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”
4 Replies
Nov 23, 2019 12:27 pm
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.
FOR EXAMPLE
s1 = "Truth, Justice And The American Way"
s2 = "The American Way"
s3 = "All That Stuff"
s4 = substituteString s1 s2 s3
RESULT:
"Truth, Justice And All That Stuff"