[英]How to extract multi line and white space including text from another text using RegEx?
This is my text: 这是我的文字:
[[>
Check this out!
And also this one!
Well, I also have this
[[MyVariable>5:15]]
I want to extract: 我要提取:
Check this out!
And also this one!
Well, I also have this
and 和
MyVariable
and 和
5:15
When it's only [[MyVariable>5:15]]
I can extract values using this RegEx: /\\[\\[(.*)\\]\\]/g
. 仅当[[MyVariable>5:15]]
我可以使用此RegEx提取值:/ /\\[\\[(.*)\\]\\]/g
.*) /\\[\\[(.*)\\]\\]/g
[[MyVariable>5:15]]
/ /\\[\\[(.*)\\]\\]/g
。 However, I'm unable to get multi-line version which starts with [[>
. 但是,我无法获得以[[>
开头]的多行版本。
I tried \\[\\[\\>(\\s\\S)\\]\\]
with no luck. 我尝试\\[\\[\\>(\\s\\S)\\]\\]
没有运气。
How do I get what I want? 我如何得到想要的东西?
(I'm using JavaScript) (我正在使用JavaScript)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.