As the title says, I want to write a regex r such that
Splitter.onPattern(r).splitToList("a.b.c.d[e.f.g]"); results in
[a, b, c, d[e.f.g]]
I have been playing around trying to get it right, but can't figure it out. I thought "\\.((?!\\[)*)\\]*" should have worked (to match any dot that is followed by a string not containing '[' that ends with ']'), but it still splits on all dots for some reason.