edits: the quotes thing...

Fairlight fairlite at fairlite.com
Thu Sep 1 08:46:19 PDT 2005


On Thu, Sep 01, 2005 at 10:39:28AM -0400, after drawing runes in goat's blood,
John Esak cast forth these immortal, mystical words:
> 
> I don't know why I'm going to put my neck out there on the chopping block...
> I, too, think this can't be done in an edit.  You want to remove quotes....
> huh?  Well, the only possible way I can think to do this *might* be as
> follows.  Create your own complex edit which is a series of lines that
> describe every single character in the ASCII set which you WILL allow in the
> field.... and then use that as the edit type.  Of course, the " would not be
> one of the specified allowed characters.
> 
> Since you can't specify a " as a character within "'s as in """ or the "\""

Didn't we spend an hour or so in the fP Room months back trying to do
something with double-quotes in an edit and deem it impossible?  I have a
vague recollection of that inbetween discussion of various confections.  :)

> tried this, because I don't want to do something as tedious as this.  I once
> wrote an edit that took away all punctuation and spaces... and it was enough
> of a painful tedium to make me not want to do that again. (It, by the way,
> is an example in the filePro Survivor Series CD's).

Whereas (and I'll stick my neck out here too), if fP bothered to support
the power of regex (and especially extended regex and even perl extended
regex), you could get it down to something like:

$var = s/(?:[^\w\d]|_)//g;

It doesn't get much simpler than that.  (For those that think I'm on dialup
and the next line should have been NO CARRIER, that is perfectly valid
syntax in perl extended regex for what John described doing.)

You could rewrite it in filePro syntax however you wanted.  I think
fP -should- implement regex.  I've thought this for years.  Both in
processing, and as a secondary edit type--probably flagged to be taken as
such, and if not flagged, then old behaviour would be assumed.

That would make it Very Powerful Indeed.  I've found very little that can't
be done with a regex, and fewer still that can't with several sequential
ones, logically ANDed or ORed.  Actually, I'm at a loss to think of a
filePro edit I've seen that couldn't be done a a regex substitution or
match, and come out shorter at that.

mark->
-- 
          *****   Fairlight Consulting's Software Solutions   *****
OneGate Universal CGI Gateway:                  http://onegate.fairlite.com/
FairPay PayPal Integration Kit:                 http://fairpay.fairlite.com/
RawQuery B2B HTTP[S] Client & CGI Debugger:     http://rawquery.fairlite.com/
Lightmail Mail Sending Agent:                   http://lightmail.fairlite.com/
FairView Image Viewer for Integration:          http://fairview.fairlite.com/


More information about the Filepro-list mailing list