1
我有這樣的字符串(如Python DOC):正則表達式匹配3報價串
"""
1 string with two lines
in this area
"""
"""
2 string, but with more "quotes"
"""
"""
3 string
multiline and "multiquote"
"""
我需要:
array(
[0] => 1 string with two lines
in this area
[1] => 2 string, but with more "quotes"
[2] => 3 string
multiline and "multiquote"
)
但是,我有:
/(?<!""")(?<=(?!""").)"(?!""")/im
和:
/(\x22\x22\x22)[\w\s\d\D\W\S.]+(?\x22\x22\x22)/i