Re: creating a pattern using a previous match and a count of the number of '('s in it

2009-01-27 Thread MRAB
me wrote: I'm new to regexs and trying to get a list of all my C++ methods with balanced parenthesis as follows. #find all c++ method prototypes with a '::' in the middle #upto and including the 1st closing parenthesis pattern_upto_1st_closed_parenth = re.compile('\w+::\w+\([^)]*\)') matc

creating a pattern using a previous match and a count of the number of '('s in it

2009-01-27 Thread me
I'm new to regexs and trying to get a list of all my C++ methods with balanced parenthesis as follows. #find all c++ method prototypes with a '::' in the middle #upto and including the 1st closing parenthesis pattern_upto_1st_closed_parenth = re.compile('\w+::\w+\([^)]*\)') match_upto_1st_cl