So I spent a lot of time on another stack overflow question, and the same problem came up with a previous one. Non-capturing groups aren't working as I'd expect them to, or so I believe.
This is a silly example along the lines of someone else's CSS test string...
Here's my regex:
(?:(rgb\([^)]*\)|\S+)(?:[ ]+)?)*
And here's the test string:
1px solid rgb(255, 255, 255) test rgb(255, 255, 255)
I'm expecting match groups of "1px","solid", "rgb(255, 255, 255)", "test", "rgb(255, 255, 255)"
But I'm only getting the last token matched.
This is the link for testing:
http://regex101.com/r/pK1uG7
What's going wrong here? I thought I had non-capturing groups down, and the way it's explained at the bottom of regex101 makes sense, including the "greediness".