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



Hi Scott,

I think I get it now. In order to process each match, you need to remove the
leftmost portion of the string that was found, and pass the remainder back
into regexec unil no match is found.

I didn't mean to imply that the C runtime regex routines should work the
same as .NET - far from it. I was merely using VB.NET as an alternate
example. I have an application that processes regular data from an automated
process. Part of the data specification is there are exactly 10 lines of
hexadecimal data, and each line begins with a colon. One of the initial
checks for validity is to count the number of colons, using the regex
example posted earlier (regex.matches(...).count). From a syntax standpoint
only, it is shorter and "cleaner" code than looping over the regex. (It may
loop internally, but I didn't have to code it.)

No worries.
--Loyd






On Wed, Feb 3, 2010 at 2:36 PM, Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx>wrote:

Hi Loyd,

You seem to already understand what's going on... so I'm taking your
message just as an expression of astonishment, and a complaint that it
doesn't work like .NET.

All I can say is that (a) I didn't design it, and (b) the ILE C
functions work exactly the same as the RE functions provided in C
languages on Unix systems, which have been around for 30+ years.

If you indeed are struggling to understand something, then please spell
out what you don't understand. Because your code seems to work exactly
as I would expect.


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.