Tell us what’s happening:
** Wondering Why wild card . (dot) not match sun and pun when i use g flag in the end of regex? Maybe wild card match only one character, we cant use g flag for wild card.
Its work fine without g flag. Can anyone explain plz…
Your code so far
let exampleStr = "Let's have fun with regular expressions!";
let unRegex = /un./g; // Change this line
let result = unRegex.test(exampleStr);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/regular-expressions/match-anything-with-wildcard-period