StringSplitOptions.RemoveEmptyEntries doesn't work as advertised

Most likely because you change the string after the split. You trim the values after splitting them, RemoveEmptyEntries doesn't consider the string " " empty.

The following would achieve what you want, basically creating your own strip empty elements:

var tagsSplit = tags.Split(',').
                  Select(tag => tag.Trim()). 
                  Where( tag => !string.IsNullOrEmpty(tag));

Adjacent delimiters yield an array element that contains an empty string (""). The values of the StringSplitOptions enumeration specify whether an array element that contains an empty string is included in the returned array.

" " by definition is not empty (it is actually whitespace), so it is not removed from resulting array.

If you use .net framework 4, you could work around that by using string.IsNullOrWhitespace method

var tagsSplit = tags.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)
                .Where(x => !string.IsNullOrWhiteSpace(x))
                .Select(s => s.Trim());

RemoveEmptyEntries do not means space.
Your input string include many "space". You should notice that "space" is not empty. In computer, space is a special ASCII code. so the code:

var tagsSplit = tags.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)
    .Select(s => s.Trim());

means:

  1. Split the input by ',' and remove empty entry, not include space. So you got an array with some space elements.
  2. Then you do trim for each of elements. The space elements become to empty.

That's why you got it.