So I spent a lot of time on another question, and the same problem arose from the previous one. Non-retaining groups do not work as I expected, or, as I believe.
This is a silly example from another CSS test string ...
Here is my regex:
(?:(rgb\([^)]*\)|\S+)(?:[ ]+)?)*
And here is the test line:
1px solid rgb(255, 255, 255) test rgb(255, 255, 255)
I expect matching groups "1px", "solid", "rgb (255, 255, 255)", "test", "rgb (255, 255, 255)"
But I only get the last token.
This is the link for testing:
http://regex101.com/r/pK1uG7
What's going on here? I thought I didnβt have capture groups, and the way that he explains at the bottom of regex101 makes sense, including greed.