Author verdy_p
Recipients verdy_p
Date 2009-10-14.20:49:18
SpamBayes Score 1.76384e-08
Marked as misclassified No
Message-id <>
Rationale for the compilation flag:

You could think that the compilation flag should not be needed. However, 
not using it would mean that a LOT of existing regular expressions that 
already contain capturing groups in repetitions, and for which the 
caputiring group is effectively not used and should have been better 
encoded as a non-capuring group like (?:X) instead of (X), will suffer a 
negative performance impact and a higher memory usage.

The reason is that the MatchObject will have to store lists of 
(start,end) pairs instead of just a single pair: using a list will not 
be the default, so, 
MatchObject.start(groupIndex), MatchObject.end(groupIndex), and 
MatchObject.span(groupIndex) will continue to return a single value or 
single pair, when the R compilation flag is not set (these values will 
continue to return only the last occurence, that will be overriden after 
each matched occurence of the capturing group.

The MatchObject.groups() will also continue to return a list of single 
strings without that flag set (i.e. a list of the last occurence of each 
capturing group). But when the R flag will be specified, it will return, 
instead, a list of lists, each element being for the group with the same 
index and being itself a list of strings, one for each occurence of the 
capturing group.
Date User Action Args
2009-10-14 20:49:19verdy_psetrecipients: + verdy_p
2009-10-14 20:49:19verdy_psetmessageid: <>
2009-10-14 20:49:18verdy_plinkissue7132 messages
2009-10-14 20:49:18verdy_pcreate