In the last challenge, you searched for the word <code>"Hello"</code> using the regular expression <code>/Hello/</code>. That regex searched for a literal match of the string <code>"Hello"</code>. Here's another example searching for a literal match of the string <code>"Kevin"</code>:
<blockquote>let testStr = "Hello, my name is Kevin.";<br>let testRegex = /Kevin/;<br>testRegex.test(testStr);<br>// Returns true</blockquote>
Any other forms of <code>"Kevin"</code> will not match. For example, the regex <code>/Kevin/</code> will not match <code>"kevin"</code> or <code>"KEVIN"</code>.
- text: Your regex <code>waldoRegex</code> should find <code>"Waldo"</code>
testString: 'assert(waldoRegex.test(waldoIsHiding), ''Your regex <code>waldoRegex</code> should find <code>"Waldo"</code>'');'
- text: Your regex <code>waldoRegex</code> should not search for anything else.
testString: 'assert(!waldoRegex.test(''Somewhere is hiding in this text.''), ''Your regex <code>waldoRegex</code> should not search for anything else.'');'
- text: You should perform a literal string match with your regex.
testString: 'assert(!/\/.*\/i/.test(code), ''You should perform a literal string match with your regex.'');'