I'm looking to split space-delimited strings into a series of search terms. However, in doing so I'd like to ignore spaces within parentheses. For example, I'd like to be able to split the string
a, b, c, search:(1, 2, 3), d
into
[[a] [b] [c] [search:(1, 2, 3)] [d]]
Does anyone know how to do this using regular expressions in Java?
Thanks!