Reputation: 1689
I need some help with javascript and regex.I want to remove some text in title.
I am new to regex and I tried this but it doesn't seems to work.
title.replace('/\d{4}\YEAR\d{1,2}\MONTH\d{1,2}\DATE/g', '');
Here is what I am trying to remove
2012YEAR2MONTH18DATE
Upvotes: 0
Views: 1102
Reputation: 6052
title.replace(/\d{4}YEAR\d{1,2}MONTH\d{1,2}DATE/g, '');
Dont put the single quotes for the Regex
Upvotes: 1