What does this expression return?
'<b>x</b>'.match(/<.+?>/)[0]
- '<b>'
- '<b>x</b>'
- '</b>'
- 'b'
Adding
Play Regex ▸
? makes + lazy, so it stops at the first > it can.'<b>x</b>'.match(/<.+?>/)[0]
? makes + lazy, so it stops at the first > it can.