170
rated 0 times
[
174]
[
4]
/ answers: 1 / hits: 26342
/ 12 Years ago, tue, november 6, 2012, 12:00:00
I'd like to replace character inside a string, e.g.
Drafts [2]
To:
Drafts [3]
This regex returns only Drafts 3:
str.replace(/[(.+?)]/g, 3)
Thanks for help in advance
More From » replace