No such thing as a small change | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Hi, I have made a small change.. it works.. my @lines = ("@attribute 'Sex' { Male, Female}", "@attribute 'Feature 0' real", "@attribute 'Feature 1' real", "@attribute 'Feature 2' real", "@attribute Malic_acid REAL", "@attribute Ash REAL" ); foreach my $line (@lines) { $line =~ /^@attribute\s+([']?(?:[^\']*)[']?)\s+[{]?(.*?)[}]?$/; print "relation name: $1\n"; print "type: $2\n"; } Regards Don't put off till tomorrow, what you can do today. In reply to Re: looking simple regexp for arff file format
by l.frankline
|
|