Because the regexp matching the [] expression of a jsonpath is greedy ( .* ) it prevents using multiple [] in a jsonpath. For instance

foo[?name=bar].a[0].b

will fail because \\[(.*)\\] matches [?name=bar].a[0] instead of [?name=bar]. The proposed solution is to use .*? instead.

Signed-off-by: Loic Dachary <loic@dachary.org>