skohn
(Samuel Kohn)
1
In the check your understanding section there is an option:
StringReplace["lead",_"gold"]
with the following explanation:
"This replaces each letter separately, resulting in goldgoldgoldgold, instead of making just one replacement of the whole string.".
However, what you get (see attached) is:
gold is not a valid string replacement rule.
When I go to that section, Strings | Wolfram Language Fast Introduction for Programmers, I don’t see StringReplace["lead",_"gold"], which isn’t valid syntax. I see StringReplace["lead",_ -> "gold"]
1 Like
skohn
(Samuel Kohn)
3
Pretty stupid of me. Thank you. I will try being more careful before commenting next time. Thank you.
1 Like