I am coding an app to practice English, I need a javascript regular expression to find all the docs in a mongoDb collection on which the 'answer' property contains a word that ends in ing and exclude a few words from the match like everything, something, anything, nothing.
I have the following query right now:
{ '$or': [ { answer: /ing/i } ],
I20190303-13:26:00.915(-4)? answer: /^(?!.*(\bsomething\b|\banything\b|\beverything\b|\bthing\b|\bnothing\b))/gi }
Unfortunately, my current query excludes strings like: 'I am doing nothing.' because nothing is in the text. But I would like texts like this to match because doing is present.
I want to get all the questions from the database whose answer contains one or more gerunds, unfortunately there are words that end in ing that are not gerunds.