我希望从一段文本中提取字符串。这个字符串必须以特定的字符串开头和结尾。
示例:
词语1 = "Hello"
词语2 = "World"
文本:
Hello, this is a sentence.
The whole World can read this.
What World?
The piece of text i want to extract is:
Hello, this is a sentence.
The whole World
我应该使用什么样的正则表达式来提取字符串。
注意:字符串“World”出现了两次。
谢谢