fork download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main() {
  7. foreach (Match m in Regex.Matches("(DWORD code, bool check, float *x1, float *y1, float *x2, float *y2)"
  8. , "(?<=[(,])\\s*([^,)]*)\\s*(?=[,)])")) {
  9. for (var i = 1 ; i != m.Groups.Count ; i++) {
  10. Console.WriteLine("'{0}'", m.Groups[i]);
  11. }
  12. }
  13. }
  14. }
Success #stdin #stdout 0.08s 34112KB
stdin
Standard input is empty
stdout
'DWORD code'
'bool check'
'float *x1'
'float *y1'
'float *x2'
'float *y2'