I have the two following sentences:
1: KEYWORD this is a random sentence
2: this is another random sentence
I would like to match all after KEYWORD if KEYWORD exists, and if it doesn't, I want to match all.
So the output would be:
1: this is a random sentence
2: this is another random sentence
I tried a few things that did not lead me anywhere close:
(?<=KEYWORD)[\s\S]+This would only match everything after the keyword, but will fail to capture anything if the keyword is not present...
PS: I use java