kiran kiran

kiran kiran

  • NA
  • 3
  • 0

string concatenation in regex C#

Oct 16 2009 1:09 AM

Hi,
I have this string with me.
class a : public b, public c, public d { (class syntax in C++)
Now i want to get all baseclass names in one single variable through regex in C#.
I am getting derived class name properly, but getting base class name is the issue.
I have developed this regex :
@"((class|interface)\s*?(?<classname>\w*?)(\s*?|\n*?)(\:?)(\s*?|\n*?)((public|private|protected)?(\s*?|\n*?)(?<baseclassname>\w*?)[\s|\n|\,]*?)*?(\{))"

Can anyone help me in the same?

Answers (2)