Question: my current branch is staging\_kei20201211, I want to fetch the latest code from origin/staging branch, I type the following command

```
git fetch origin staging

```

and it said
[![fetch output](https://i.stack.imgur.com/EaUNB.jpg)](https://i.stack.imgur.com/EaUNB.jpg)

1)
then I go to visual studio to see the history of my branch staging\_kei20201211, but I cannot see the commit c03c99691 as stated in the fetch output, why?

2. what is the meaning of the fetch output screen?
From http://XXXXXX/gitea/elm-ha/CFMS

* branch staging -> FETCH\_HEAD
c97e1dbb7..c03c99691 staging -> origin/staging

Answer: 
As the [comment by @Thomas](https://stackoverflow.com/questions/65336932/how-to-use-split-array-in-java#comment115509420_65336932) wisely suggests above, a good [CSV](https://en.wikipedia.org/wiki/Comma-separated_values) parser which can be instructed that double quote is an escape character is probably the best way to go here. If you're stuck doing this from scratch in Java, [regular expression (regex)](https://en.wikipedia.org/wiki/Regular_expression) can be used, with the following pattern:

```regex
".*?"|[^,]+

```

This will attempt to match a double quoted term *first*. Only if it can't find such a term, then it will consume arbitrarily until hitting the next comma separator (not inside a double quote). We can use a formal Java regex pattern matcher here:

```java
List<String> terms = new ArrayList<>();
String data = "12-Jan,TRSF E-BANKING CR 12/01 95031 NABUNG M1 DES  AGUS JENI  ,0,\"50,000.00 CR\",\"3,583,090.00\" ";
String pattern = "\".*?\"|[^,]+";
Pattern r = Pattern.compile(pattern);
Matcher m = r.matcher(data.trim());
while (m.find()) {
    terms.add(m.group(0).trim());
}
System.out.println(terms);

```

This prints:

```
[12-Jan, TRSF E-BANKING CR 12/01 95031 NABUNG M1 DES  AGUS JENI, 0,
 "50,000.00 CR", "3,583,090.00"]

```
```java
String data = "12-Jan,TRSF E-BANKING CR 12/01 95031 NABUNG" +
        " M1 DES  AGUS JENI  ,0,\"50,000.00 CR\",\"3,583,090.00\" ";

// any sequence of characters
// between quotes, or a single comma
String pattern = "\".*?\"|,+";

String[] arr1 = data
        // append substrings that matches the given
        // pattern with additional delimiter characters
        .replaceAll(pattern, "$0::::")
        // remove comma
        .replace(",::::", "::::")
        // split into an array
        // by delimiter characters
        .split("::::", 0);

// remove leading and trailing
// whitespaces and empty strings,
// replace sequence of whitespace
// characters with a single whitespace
String[] arr2 = Arrays.stream(arr1)
        .map(String::trim)
        .map(str -> str.replaceAll("\\s+", " "))
        .filter(str -> str.length() > 0)
        .toArray(String[]::new);

// output in a column
Arrays.stream(arr2).forEach(System.out::println);
// 12-Jan
// TRSF E-BANKING CR 12/01 95031 NABUNG M1 DES AGUS JENI
// 0
// "50,000.00 CR"
// "3,583,090.00"

```