Why these return null :
var str="Is this all abc bbb c is";
var patt1=/is(?=bbb)/;
var str="Is this all abc bbb c is";
var patt1=/is(?=bbb)/;
var str="Is this all there is";
var patt1=/is(?=all)/; // <------ (?=all) vs (? =all)
but this returns is :
var str="Is this all there is";
var patt1=/is(?= all)/;
?
is the regex “look-ahead” function, so here is what your regular expressions mean:
Both of those do not exist in your string, so you get no matches.