3 回答

TA貢獻1966條經驗 獲得超4個贊
(?<=This is)(.*)(?=sentence)
(?<=)
(?=)
This is(.*)sentence
.
.
.*
.*?
更新
This is(?s)(.*)sentence
.
更新2:
(?<=is \()(.*?)(?=\s*\))

TA貢獻1860條經驗 獲得超9個贊
懶惰量詞
(?<=This is)(.*)(?=sentence)
my first sentence. This is my second
This is my first sentence. This is my second sentence.
見演示.
?
(?<=This is).*?(?=sentence)
DOTALL模式以匹配跨線中斷
(?s)
(?s)(?<=This is).*?(?=sentence)
參照系
- 3 回答
- 0 關注
- 912 瀏覽
添加回答
舉報