Regular Expressions - Positive and Negative Lookahead

Tell us what’s happening:
Whats the real life application of lookaheads.

Your code so far

let sampleWord = "astronaut";
let pwRegex =  /(?=\w{6})(?=\w*\d{2})/;// Change this line
let result = pwRegex.test(sampleWord);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0

Challenge: Regular Expressions - Positive and Negative Lookahead

Link to the challenge:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.