Hi I&#039;ve been learning regular expressions recently and have a fairly good understanding of them now.<BR>But I&#039;m getting hung up now that i&#039;m trying for a more complicated one. The line i&#039;m trying to parse is this<BR><BR>func (int i, chr c)<BR><BR>Now i have a simpler version working for the line:<BR><BR>func (int i)<BR><BR>which parses the "func" "int" and "i" all into their own groups.<BR>The regular expression i have working for that is:<BR><BR>(?&#060;func&#062;w*)s*[(](?&#060;type&#062;w*)s*(?&#060;name&#062;w*)[)]<BR><BR>Now the problem w the more complex one is I only seem to get the 2nd group of results meaning only "chr" and "c" are in groups, "int" and "i" are no where to be found.<BR>The regex string I&#039;m using right now for it is:<BR><BR>(?&#060;func&#062;w*)s*[(](?:s*(?&#060;type&#062;w*)s*(?&#060;name&#062;w*)[,]?)*?[)]<BR><BR>[,]? - allows for 0 or 1 commos after each set of groups here <BR><BR>As you can see I added a non capturing group around what should be either "typ x" or "typ x," so it will get 1 or more instance of this.<BR><BR>Meaning it should also be able to read:<BR><BR>"typ x, typ y"<BR>such as<BR>"int i, chr c"<BR><BR><BR>here 4 groups should be created. 1 for each type and 1 for each name.<BR>But only 2 are created containing the last 2 matches, "chr" and "c"<BR><BR>It does how ever match<BR><BR>"typ x"<BR>such as<BR>"int i"<BR><BR>with and without a common after it.<BR><BR>So i simplified the test to<BR><BR>[a](bd)*?[a]<BR><BR>testing<BR><BR>adbdba<BR><BR>which should produce 2 groups<BR><BR>g1= "db"<BR>g2= "db"<BR><BR>but it only produces 1 group containing:<BR>"db"<BR><BR>So how to I tell it to make new groups for each match?!