2 ms·
'((/**/) => 5)(/**/)'.replace(/(\(\s*\)|[^0-9.()+\-*\/><=!&|?:])+/g, '') > "((/**/)=>5)(/**/)" ((/**/)=>5)(/**/) > 5 Yup, this does indeed work.
by Groxx 8y ago
'((/**/) => 5)(/**/)'.replace(/(\(\s*\)|[^0-9.()+\-*\/><=!&|?:])+/g, '')
> "((/**/)=>5)(/**/)"
((/**/)=>5)(/**/)
> 5
Yup, this does indeed work.