Try this regular exp.
test = "[5] new value";
test = test.replace(/\[(.+?)\]/, '$1');
alert(test);
test = "FIFA publishes its results according to IFRS. The total compensation for the management committee in 2011 was 30 million for 35 persons. Blatter, the only full time, earns approx 2 Mio CHF, 1.2 Mio fix, the rest bonus.[4][5][6]";
test = test.replace(/\[(.+?)\]/g, '$1');//for global replace
alert(test);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.