Tell us what’s happening:
Why is there an asterix in the code used in the explanation /t[a-z]*i/ ?
Doesn’t astrix mean that the immediate preceding condition is optional? In which case it should have matched and returned [“ti”] the first time without the need for a “?”.
Where lies my misunderstanding?
Your code so far
let text = "<h1>Winter is coming</h1>";
let myRegex = /<.*>/; // Change this line
let result = text.match(myRegex);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/regular-expressions/find-characters-with-lazy-matching/