If i perform this instruction in the node repl
"hello".match(/(w+)(.*)/)
It returns this
[ 'hello',
'hello',
'',
index: 0,
input: 'hello' ]
I expected it to return the first three items, where did the other values come from?
See Question&Answers more detail:os