4
4

2 回答 2

4

You can use look ahead:

str = str.replace(/”(?=[^”]*$)/,"<span class=quote>”&lt;/span>")

This will replace a " which is followed by a sequence of non-" characters till the end.

于 2013-02-27T16:22:49.647 回答
0
于 2013-02-27T16:27:59.340 回答