× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Fri, 4 Oct 2002, Booth Martin wrote:
>
> what am I missing?  Why wouldn't the %Scan BIF work?  {Left if Position =1}
> {Middle if Position > 1 And  Position < (%len -start)} Else  {right }
>

The %SCAN BIF would work if you only wanted EXTREMELY SIMPLE pattern
matching.   To do something even close to the power of even the most
basic regular expressions would take thousands of lines of code.

Take the follow regular expression:

       "^A[RP]2002040[1-7]"

That could be used to match a filename that started with either "AR" or
"AP" and had a name that ended with any date from the first to seventh of
april in 2002.   It wouldn't match something that was "BAR20020401"
however, even tho AR20020401 is a substring of it.   It wouldn't match
any other dates in april besides the 1st - 7th.  It would include both
AR and AP, but not AB or anything else.

Sure, you could write a routine to match that exact set of conditions.
But you couldn't write one generic enough to let the user enter any search
pattern he wanted, and produce any results he wanted to that level.

At least, you couldn't do it without spending a LOT of time writing the
routines and testing and debugging them.

With regular expressions, all that capability is there, available for you
to use, and at very little time or cost.

That's what you're missing.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.