in reply to Using regexps to parse an XML DTD file
Not what I would do ($1 is not neccesarily a good thing ;-)), but here's some code that works, note that it's not all a regex :-)
$string = "<!ELEMENT ORDER (NAME,DELIVERY,PAYMENT,ORDERNUMBER)>"; $string =~ m/\((.*)\)/; @array = split (/,/,$1); foreach (@array){print "$_\n"}
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Using regexps to parse an XML DTD file
by Leitchn (Acolyte) on Nov 26, 2000 at 02:09 UTC | |
by merlyn (Sage) on Nov 26, 2000 at 02:50 UTC |
In Section
Seekers of Perl Wisdom