in reply to Re^4: regex extraction for variable number of args
in thread regex extraction for variable number of args

I can think of many uses for non-capturing parentheses with repetition. In fact, non-capturing parentheses with repetition are more sane than capturing parentheses with repetition, because the capturing parentheses will only keep the last match of the repetition. As an example a simple checker to check that a line matches a CSV-like format, using non-capturing parentheses and repetition:

$line =~ /^(?:[^,]+|"[^"]+")(?:,(?:[^,]+|"[^"]+"))*$/

That one matches one well-formed column, and then optionally a repetition of comma and more well-formed column.