Find Characters with Lazy Matching- A new challenge!

Tell us what’s happening:
So after solving the Lazy Matching challenge I got the output as < h1 > which is correct. But what if, I need the output as < h1>< /h1>. What would that code look like?

Your code so far


let text = "<h1>Winter is coming</h1>";
let myRegex = /<.*>/; // Change this line
let result = text.match(myRegex);

Hello there,

That is a useful exercise for yourself. Have a look at this tool (play around): https://regex101.com/

I did it with Capture Groups, and Look Aheads.

Hope this helps