|
-- -- [ Picked text/plain from multipart/alternative ] 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 } --------------------------------------------------------- Booth Martin http://www.MartinVT.com Booth@MartinVT.com --------------------------------------------------------- -------Original Message------- From: rpg400-l@midrange.com Date: Friday, October 04, 2002 04:14:54 PM To: rpg400-l@midrange.com Subject: Re: string compares with 'wildcards' in rpgiv 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 > _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l. . -- [ Content of type image/gif deleted ] --
As an Amazon Associate we earn from qualifying purchases.
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.