need to add slashes
Kenneth Brody
kenbrody at bestweb.net
Fri May 26 06:51:51 PDT 2006
Quoting Fairlight (Fri, 26 May 2006 09:38:50 -0400):
> The honourable and venerable Kenneth Brody spoke thus:
> > >
> > > [ * ]<"\">"'"[ * ]
> > >
> > > Allow 0 or more characters, insert a backslash before any
> > > apostrophy, followed by zero or more characters.
> >
> > No, that's not what it says:
> >
> > [ * ] - Accept zero or one character. (And, unless you're at
> > EOF, it will always accept one character.)
>
> That's not how I interpreted Laura's help files (happened to be on the
> system I tested on):
>
> * Accept a single character.
> [ A ] Expression A is optional. It may occur zero or more times.
Okay, that's wrong. "[ A ]" may occur zero or one time. See further
down at "[{ A }]" which is correct in the "zero or more times".
> So my [ * ] was actually an attempt to take a single character zero or
> more times in advance and retreat of any apostrophe, according to my
> interpretation of the docs available. You can see why I was under that
> impression, given the verbiage.
Well, let's assume you had the correct syntax for "zero or more times",
and used:
[{ * }]<"\">"'"[{ * }]
This is still wrong, as the "[{ * }]" means "any character (including
apostrpohes) zero or more times". In other words, the entire field.
After consuming the entire field, including the apostrophes, there is
no way for an apostrophe to still be there, as your edit requires.
[...]
> > You have no repeat loops.
>
> I thought [ * ] was analogous to a RE .* in this context, given the
> combination of what I read. And it -is- RE thinking combined with what
> I read that led me to this conclusion. In RE, . is match any single
> character, a * after anything is accept the previous notation zero or
> more times. By the same logic, what I did in the edit should have
> worked in theory. :) Either the docs are wrong (doubtful), or my
> interpretation of them is wrong (more likely). But now you know why
> I interpreted them the way I did.
In this case, Laura's help file is wrong. (Hey, it happens.) But,
the logic is still flawed, as described above.
[...]
--
KenBrody at BestWeb dot net spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com
More information about the Filepro-list
mailing list