parentheses only used for capture group in regular expression matching?
<p>I have a confusion when reading regular expression written by others, my question is parentheses <code>()</code> could only be used for capture group? Or we could use it to make regular expression more elegant to read by group logical set of operations together, especially for long regular expression?</p>

<p>I ask this since I sometimes see after people write long regular expression, they write additional parentheses even if they do not need to know capture group match information -- I mean even if they just need to know if the whole regular expression match or not, they still add some parentheses.</p>