Why is my regex not working
Posted: Sat Aug 27, 2016 4:40 pm
Just have a random dumb question, why is that my below regex is not working ?
var item = "&item";
item.replace('/(&\w+)/g' , 'yolo');
I still don't see the contents of item being replaced with 'yolo'.
var item = "&item";
item.replace('/(&\w+)/g' , 'yolo');
I still don't see the contents of item being replaced with 'yolo'.