`[0]` contains the full string, `[1]` the first matched block within parenthesis. Since the match was successful (while loop) and the regex contains a parenthesis there must be one result.