Leitchn has asked for the wisdom of the Perl Monks concerning the following question:

OK - I know there are various tools out there to do this, but I need to do it myself.
So here goes......

What I'm currently trying to do is get the children from this line in a DTD file:


I'm currently drowning in regexps, and my current attempt is wildly off track - can anyone point out where I'm going wrong?

while ($dtdLine=~/(\((.*?)\,|\,(.*?))/sg){ push(@children,$1); print "@children\n"; }