I have the String
shape="box", fontsize = "130"fontstyle= " ITALIC " fillcolor=red";
and the pattern
"(([^\\s,]+)((\\s*)=(\\s*)\"(.+?)\"))"
which currently matches
shape="box"
fontsize = "130"
fontstyle= " ITALIC "
as intended.
I need those matching strings separated and stored in an array. The easiest way I thought of was using String.split(inverted pattern), however I quickly realized that matching the inverse of a specific pattern, that is everything but this pattern, seems to be quite a hard task. So far, I couldn't find a method working for me.
For some reason, neither negative-lookahead, nor
^((?!pattern).)*$
(which I've often seen given as the solution to my problem) seem to be working.
Is there any way to do this I'm not seeing right now?