This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
What is "a non-capturing group" and what is "a capturing group"?
A group is, by default, capturing -- meaning you can fetch groups (sub-matches inside parens) with the group(int) method.
A non-capturing group is just that -- don't capture the submatch. The group(int) method doesn't return submatches from non-capturing groups. Generally, if you don't need the value of a submatch, the group should be non-capturing, as there is no reason for the regex engine to collect the data for you, if you don't intend to use it.