'Regex String.split(/\s*/) gives different results in JavaScript and C#

I have a Regex in JS which does not produce same results in C#:

//javascript
var password = "pass";
var arrPws = password.split(/\s*/);

gives me a String[] result like the following


But when I try to reproduce it in C# I get a slightly different output:
//c#
using System.Text.RegularExpressions;

var password = "pass";
var arrPwd = Regex.Split(password,@"\s*");

the C# code adds an extra "" in the beginning and end like following
How do I eliminate the extra "" in C#?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source