.replace函数在这些RegExp上没有做任何事情。替换为RegExp不起作用
(((array[0].replace("%%_%", "<ol><li>")).replace("%_%%", "</li></ol>")).replace("%_%", "<li></li>"))
任何帮助最受赞赏。 (使用jquery 1.6.2)
输入:
Ought these are balls place mrs their times add she. Taken no great widow spoke of it small. Genius use except son esteem merely her limits. %%\_%Sons park by do make on. It do oh cottage offered cottage in written%\_%Especially of dissimilar up attachment themselves by interested boisterous%\_%Linen mrs seems men table.Jennings dashwood to quitting marriage bachelor in%_%On as conviction in of appearance apartments boisterous.%\_%%
输出:
Ought these are balls place mrs their times add she. Taken no great widow spoke of it small. Genius use except son esteem merely her limits.
1. Sons park by do make on. It do oh cottage offered cottage in written
2. Especially of dissimilar up attachment themselves by interested
boisterous
3. Linen mrs seems men table. Jennings dashwood to quitting
marriage bachelor in On as conviction in of appearance apartments
boisterous.
更新这个我没有看到任何'regex'这里 – Tushar
你如何数组看起来像?你为什么不张贴? – Jai
添加了输入和预期输出。 – Piyush