After a small break from the JS curriculum, I came back today. I’m reading about the Lazy Matching but after trouble not passing with keeping the
? within the regex. Here’s the challenge page:
I kept having issues implementing the
? so in my annoyance, I ripped out everything within the
> and simply did this:
let myRegex = /< h1>/; // Change this line
***I put a space between
< and h so it would show in the example/spoiler.
To my surprise, this answer worked. But why? I was under the impression that we are supposed to use the
? for lazy matching. I don’t believe my “solution” is correct in this instance.
If I should have done it a different way to really pass it, I need to know because how else will I properly use lazy matching?
To add to this, others are doubting the test results and the OP here has 2 working options: