1
doubleflower OP 自已解决了 (["'])(?:\\.|(?!\1).)*\1
|
2
ngn999 Dec 17, 2016 |
3
doubleflower OP |
4
doubleflower OP |
5
sagaxu Dec 18, 2016
@doubleflower 遇到\"转义字符就不行了
|
6
doubleflower OP @sagaxu 哈哈源代码里不准用\",所以不考虑这个问题。(我想了下考虑进去也能做到,只是更复杂了)
|
7
icris Dec 18, 2016 (['"]).*?\1
|
8
stormhouse Dec 19, 2016
您这是要做词法分析吗
|
9
chnhyg Dec 19, 2016
(['"])([^\1]+?)\1
|
10
chnhyg Dec 19, 2016
好像在中括号内不能用 \1 ,被转义了。
|
12
ares951753 Dec 19, 2016
same question [here][1]
[1]: http://stackoverflow.com/questions/24079995/regex-multiple-quotes-selection |