cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: [chaperon] reading Excel CSV
Date Thu, 25 Mar 2004 21:09:45 GMT
On 25.03.2004 21:08, Joerg Heinicke wrote:

> "DATE","EVENT","VENUE","RACE DISTANCE","ORGANISER","CONTAC No."
> "JAN",,,,,
> "17th","GAUTENG ""NORTH"" AQUATHLON CHAMPS","Blue Bay quarry","Standard (run-swim-run)","JOHAN
KOK","072 659 2014"
> "24th","TUKKIES TRIATHLON","ROODEPLAAT","1/2 Standard","ALBIE DE LANGE","082 453 0096"
> "31st","TRI CHAMPS,  GAUTENG NORTH","ROODEPLAAT","Standard(swim-cycle-run)","JEAN-PIERRE
TEN NAPEL","082 358 4005"
> "FEB",,,,,
> "8th","GARY WHITEHOUSE MEMORIAL","ROODEPLAAT","1/2 Standard(swim-cycle-run)","HENNING
VAN ASWEGEN","082 344 5641"
> "14th","GAUTENG NORTH TRIATHLON CLINIC","LC DE VILLIERS",,"JAN VAN ROOYEN","083 601 8103"
> "28th","S.A. TRIATHLON CHAMPS","TBA","Standard (swim-cycle-run)",,
> "MAR",,,,,

I'm so far:

%ignore           "^#(.*)";
%ab char         "[^\n\r\,\"]";
%ab EscapedString "\"(<char>|<Delim>|\")+\"";
%ab String        "<char>+";
%token Value      "(<EscapedString> | <String>)";
%token Delim      "\,";
%token Break      "\r(\n?) | \n";

This makes the above line 3 handling correct, but is not able to handle 
line 5 (where I can't understand why as EscapedString contains <Delim>). 
Furthermore the escaping quotes are not removed. It seems some features 
of regular expressions are missing - or at least not known to me. Or how 
can I get parts of a matching string, what's possible normally using 
parentheses and variables?

Joerg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message