I need to split my string with any occurrence of $$ for this string:

```
String tmpHash = "NA$notValid-1$notValid-2##notValid-3##$$VALID-1##$$VALID-2##$notvalid-4$$VALID-3";

```

Here is my code: 

```
String[] arr=tmpHash.split("$$");

        for (int i = 0; i < arr.length; i++) {
            System.out.println("OUTPUT--> "+arr[i]);    

        }

```

**OUTPUT IS**

```
OUTPUT--> NA$notValid-1$notValid-2##notValid-3##$$VALID-1##$$VALID-2##$notvalid-4$$VALID-3

```

**DESIRED OUTPUT**

```
OUTPUT-->NA$notValid-1$notValid-2##notValid-3##
OUTPUT-->VALID-1##
OUTPUT-->VALID-2##$notvalid-4
OUTPUT-->VALID-3

```