I want to use RLIKE in MySQL to select cells that have the word "chocolate". However there must also be the word "no" or "not" between the word "chocolate" and the last fullstop that occurred before "chocolate".
In otherwirds what is the regular expresson for
.%chocolate
where % must contain 'not' or 'no' AND % must not contain another fullstop
For example all 3 of the following sentences are acceptable:
Charlie likes fruits. Charlie does not like chocolate.
Today is a good day. I do not feel like eating chocolate or apples.
1. No chocolate is allowed.
The following 3 examples are rejected:
Andy is not a child... He loves chocolate.
Today is not a good day. I have no money. I want to eat chocolate and orange.
1. Chocolate is good for you.
Thank you.