Multiple lookaheads

Hi,

Why do I need a period in the second lookahead for it to return true?

let str = "wwwwdewwww";
let regex = /(?=d)(?=.e)/;
console.log(regex.test(str));
.	- Find a single character, except newline or line terminator

Hey man you can refer this to learn more about regexp.

Thanks - I know what the period does, I just don’t get why the second look ahead doesn’t work without it

because the lookaheads start looking from same position, so you can’t have both an e and a d in the same place

Thanks.

Does anyone have any other tutorials (video or text) that they found useful to aid their understanding or positive and negative lookaheads?