Tell us what’s happening:
I am receiving the following error:
// running tests Your regex should match
“bana12”
Your regex should match
“abc123”
Your regex should match
“astr1on11aut”
// tests completed
Your code so far
let sampleWord = "astronaut";
let pwRegex = /^\D(?=\w{5,})(?=\d\d)/; // Change this line
let result = pwRegex.test(sampleWord);```js
let sampleWord = "astronaut";
let pwRegex = /^\D(?=\w{5,})(?=\d\d)/; // Change this line
let result = pwRegex.test(sampleWord);
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15
.
Challenge: Positive and Negative Lookahead
Link to the challenge: