What does this expression return?
'$5, $10, €7'.match(/(?<=\$)\d+/g)
- ['5', '10']
- ['$5', '$10']
- ['5', '10', '7']
- ['7']
The lookbehind
Play Regex ▸
(?<=\$) keeps only numbers preceded by a dollar sign, without capturing the sign.