× 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.



You can do this, and much, much more, with regular expressions.   The
ILE C library has functions called "regcomp", "regexec", "regfree"
for doing this sort of thing.

I posted a sample a while back, you can find it in the archives here:

http://archive.midrange.com/rpg400-l/200105/msg00106.html


On Fri, 4 Oct 2002, Richard B Baird wrote:

> hey all,
>
> i've searched the archives to no avail, and started to write this myself,
> but i'm struggling and it's starting to get out of hand...  does anyone
> have something similar to this in their toolbox, or know of an existing api
> or c routine to do this?
>
> i need an elegant way of comparing one string that could have a wild card
> or two, to another string.
>
> for instance  the first string could have:
> 1.  *Monthly  or
> 2.   Monthly* or
> 3.  *Monthly*
>
> and compared to the following fields:
>
> a.  Bi-Monthly
> b.  Bi-Monthly 1st Quarter
> c.  Monthly Reports
>
> compares would result in:
>
> 1. would match a. only
> 2. would match c. only
> 3. would match a, b and c.
>
> btw, if you haven't done it already, don't write it for me....
>
> tia,
>
> rick
>



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.