這是我的文字:如何使用RegEx從其他文本中提取包含文本的多行和空白空間?
[[>
Check this out!
And also this one!
Well, I also have this
[[MyVariable>5:15]]
我想提取:
Check this out!
And also this one!
Well, I also have this
和
MyVariable
和
5:15
當它只是[[MyVariable>5:15]]
我可以使用此RegEx提取值:/\[\[(.*)\]\]/g
。但是,我無法獲得以[[>
開頭的多行版本。
我試過\[\[\>(\s\S)\]\]
沒有運氣。
我如何得到我想要的?
(我使用JavaScript)
'\ [[[[] [\ s \ S] *?\] \]' – revo