S. Fisher wrote:
Regular expressions are used by vi and emacs; in fact, any editor that
doesn't let you do a regex search is a joke. (Even some microsoft
applications understand regexes.) So everyone who programs should
learn regular expressions.
Regular expressions are also used by grep, an
> Regular expressions are used by vi and emacs; in fact, any editor that
> doesn't let you do a regex search is a joke. (Even some microsoft
> applications understand regexes.) So everyone who programs should
> learn regular expressions.
I can write regexs and decypher them, I even being guilty
> > But if you insist, I can give you a full running application. My
> > point was that regular expression are normally a nightmare to debug
> > and maintain.
>
> I don't think so.
>
> > Plus not everybody knows them (syntax wise),
>
> Not everyone knows how to tie his shoelaces.
Not everybody
Not everyone knows how to tie his shoelaces.
One who doesn't tie his shoelaces doesn't mean he doesn't know how to do
it. ;)
Regular expressions are no more against the spirit of Pascal
than associative arrays (hash tables) or any other feature
that is added by using a unit.
http://z505.co
--- Graeme Geldenhuys <[EMAIL PROTECTED]> wrote:
> The code shown in the url below works just fine. Also the usage sample
> is all you need to use the tokenizer. Just replace the FieldSpecLine
> variable with the content from a CSV file and you are good to go. I
> use it as-is in my production c
On 11/11/2007, S. Fisher <[EMAIL PROTECTED]> wrote:
>
> That's not a working sample. It has no CSV record to parse.
>
> Give a working program that we can run with no modifications
> whatsoever; parse an actual CSV record; print every field
> in the record. That's what my sample did.
The code s
--- Graeme Geldenhuys <[EMAIL PROTECTED]> wrote:
> OK, while we are busy with show-and-tell... Then have a look at my
> token library implementation.
>
> http://tinyurl.com/395vgp
>
> Sample Usage:
>
> tokenizer := TTokens.Create(FieldSpecLine, ', ', '"', '"', '\',
> tsMul
Graeme Geldenhuys wrote:
> OK, while we are busy with show-and-tell... Then have a look at my
> token library implementation.
You've implemented some kind of 'cut'. But grep is also very useful (and
more often used in a shell, at least by me).
Micha
___
OK, while we are busy with show-and-tell... Then have a look at my
token library implementation.
http://tinyurl.com/395vgp
* It's based on a Infinite State Machine.
* No external units required.
* Allows multiple separators (user selectable) between tokens.
* Allows for user selectable sepera
Fields are separated by commas, but if a field is surrounded by
double quotes it can contain commas---in fact, can contain any
byte whatsoever; double quotes (") within the field must be
doubled, just as single quotes within a Pascal string are doubled.
All we need in order to parse a csv record
10 matches
Mail list logo