private static String[] splitLine( String line ) {

	List<String> matchList = new ArrayList<String>();

	// This regex works but includes the quotes in the final result.
	Pattern regex = Pattern.compile( "[^\\s\"']+|\"[^\"]*\"|'[^']*'" );

	// This regex removes the quotes (does it really??)
	// Pattern regex = Pattern.compile( "[^\\s\"']+|\"([^\"]*)\"|'([^']*)'" );

	Matcher regexMatcher = regex.matcher( line );
	while (regexMatcher.find()) {

	    String token = regexMatcher.group();
	    // Remove quotes?	    
	    if( token.length() >= 2 
		&& ( ( token.startsWith("\"") && token.endsWith("\"") )
		     ||
		     ( token.startsWith("'") && token.endsWith("'") ) 
		     ) ) {

		token = token.substring( 1, token.length()-1 );
	    }
	    

	    matchList.add( token );
	} 
	
	return matchList.toArray( new String[matchList.size()] );
    }