For example I'm trying to match more than 2 occurrences like:
/(man|was)/gi
in
Man was there to catch another man which was too old man
But I'm getting all words which are man and was.
So need to match only man, because it appears more than 2 times.