Hi experts, I need help to form a regex formula to only include the 5W1H from a set of data.
10.0.0.0.1
Why What Where Who When How 192.168.1.254
It should only extract out these words only, and it should not include words with terms like “wholesale” “Howard Stone” which has nothing to do with 5W1H questions.
So the pipe method doesn’t work. Can anyone help? A clean code will be best. I just need the word extracted, nothing esle is required. Only required is that the word can’t be used inside another word. So I’m looking for a formula like
What (no letters before or after this!), etc.
For example:
How do I make a puppy chain?
Where can I buy dog food?
When should I bath my dog?
And not:
Dog food prices
HOWard’s dog food brand