Question: In Java I try try to use the `String.split()` method splitting a string on `";"`, but not on `"\\\\;"`. (2 back-slashes followed by a semi-colon)

Ex: `"aa;bb;cc\\;dd;ee\\;;ff"` should be split into;

```
aa

bb

cc\\;dd

ee\\;

ff

```

How do I accomplish this using a regular expression?

Markus

Answer: 
Use

```
"aa;bb;cc\\;dd;ee\\;;ff".split("(?<!\\\\);");

```

(?<!...) is called a "zero-width lookbehind". In English, you're splitting on all `;` characters that are **NOT** preceded by a double slash, without actually matching the double slash. The quadruple slash is to escape backslashes to the regex parser. The actual regular expression used in the split would then read:

```
(?<!\\);

```
This is called negative lookbehind and the syntax is like `(?<!a)b`. This matches on any b that isnt precended by an a. You would want something like:

```
(?<!\\\\);

```