Searching is useful. However, you can make searching even more powerful when it also changes (or replaces) the text you match.
You can search and replace text in a string using <code>.replace()</code> on a string. The inputs for <code>.replace()</code> is first the regex pattern you want to search for. The second parameter is the string to replace the match or a function to do something.
<blockquote>let wrongText = "The sky is silver.";<br>let silverRegex = /silver/;<br>wrongText.replace(silverRegex, "blue");<br>// Returns "The sky is blue."</blockquote>
You can also access capture groups in the replacement string with dollar signs (<code>$</code>).
Write a regex so that it will search for the string <code>"good"</code>. Then update the <code>replaceText</code> variable to replace <code>"good"</code> with <code>"okey-dokey"</code>.
</section>
## Tests
<sectionid='tests'>
```yml
- text: You should use <code>.replace()</code> to search and replace.
testString: 'assert(result == "This sandwich is okey-dokey." && replaceText === "okey-dokey", ''Your regex should change <code>"This sandwich is good."</code> to <code>"This sandwich is okey-dokey."</code>'');'