in reply to looking simple regexp for arff file format

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
Franklin

Don't put off till tomorrow, what you can do today.