// this will ignore "is" as that's is what we want"cat is animal".match(/(cat)(?: is )(animal)/) ;result ["cat is animal", "cat", "animal"]
// using lookahead pattern it will match only "cat" we can// use lookahead but the problem is we can not give anything// at the back of lookahead pattern"cat is animal".match(/cat(?= is animal)/) ;result ["cat"]
//so I gave another grouping parenthesis for animal// in lookahead pattern to match animal as well"cat is animal".match(/(cat)(?= is (animal))/) ;result ["cat", "cat", "animal"]
// we got extra cat in above example so removing another grouping"cat is animal".match(/cat(?= is (animal))/) ;result ["cat", "animal"]