我正在尝试为具有起始引号但没有结束引号的子字符串构建正则表达式。下面是一个示例字符串
"The fish was 2 long. I said: Give me that fish!.
The fish was 2" long. I said: Give me that fish!.
"The fish was 2 long. I said: Give me that fish!."
The fish "was 2 long". I said: "Give me that fish!.
所以表达式的有效输出是
String 1 - The fish was 2 long. I said: Give me that fish!
String 2 - long. I said: Give me that fish!.
String 3 - No output
String 4 - Give me that fish!.
任何想法如何构建正则表达式。
喵喵时光机
相关分类