× 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 Tue, Jun 4, 2019 at 11:54 AM <smith5646midrange@xxxxxxxxx> wrote:

It would be a ton more than 3 because I also want [punctuation/syntax]

Though it's ugly and ridiculously verbose, it may well be faster than
the "pure" regex approach in SQL.

As for having a variable search pattern:

Is there a way to build an expression so I can provide a variable value at
run time rather than freeing and recompiling the pattern every time the
variable changes?

By "recompiling the pattern" you don't mean recompiling the whole
program, do you? You really mean *just* the pattern, right? (I'm
trying to clarify because I don't really use ILE or APIs very much,
and the phrase "recompile the regex pattern" usually refers to
something that does occur during *run* time.)

Assuming my understanding of compiled regex patterns is correct, I
think the answer is no. I don't think a pattern can have a variable
portion. Even so, I don't think the overhead of recompiling a regex
pattern is that expensive compared to the apparent cost of doing it in
SQL (unless Birgitta can swoop in with a better way that nobody else
thought of).

John Y.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.