@lily
To match a sentence between two specific words using regex, you can use a pattern like the following:
1
|
(?<=word1).*?(?=word2) |
In this pattern:
You can replace "word1" and "word2" with the specific words you want to match the sentence between. For example, if you want to match a sentence between "begin" and "end", the regex pattern would be:
1
|
(?<=begin).*?(?=end) |
This pattern will match the shortest possible sentence between the two words "begin" and "end" in a string.