You are asking the same question again. So let me explain.
var str= "oofo fooloo"
var StarSymbol= str.match(/fo*/g);
var PlusSymbol= str.match(/fo+/g)
console.log(StarSymbol) // ["fo", "foo"]
console.log(PlusSymbol) // ["fo", "foo"]
Ya, both gives the same result here(for this input) but fo*
would match f
alone where fo+
would not. *
repeats the previous token zero or more times where +
repeat the previous token one or more times. So this expects the previous token to be repeated atleast one time.
Example:
> var str= "f"
undefined
> str.match(/fo*/g);
[ 'f' ]
> str.match(/fo+/g);
null
>