.means any character (except a new line). +means one or more. ?in this context mean lazy or inanimate. This means that he will try to match the absolute minimum of characters that satisfy the quantifier. Example:
> 'abc'.match(/.+/)
["abc"]
> 'abc'.match(/.+?/)
["a"]
> 'abc'.match(/.*/)
["abc"]
> 'abc'.match(/.*?/)
[""]
source
share