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

The stab in the dark looks to be right the way I read Bob's article and the
API documentation.

Consider Bob's statement: "The number of elements in this data structure
array must be greater than or equal to the value in parameter 3."

Also, the API documentation for parameter 3 says: "The nmatch value is the
number of substrings in string that the regexec() function should try to
match with subexpressions in preg."

I reckon you only get one match because you've only asked it for one.

Regards
Evan Harris

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Dennis Lovelady
Sent: Thursday, 4 February 2010 5:52 a.m.
To: 'RPG programming on the IBM i / System i'
Subject: RE: Regular Expression multi-match not as expected

I have absolutely no experience using the regex stuff, but the syntax
of the call in your code example includes "match(1)" as the 3rd
parameter. This doesn't restrict the number of find instances (1) does
it?

Thanks for the reply. Unfortunately, that's required syntax to satisfy the
RPG compiler. If a data element is DIM'd, then RPG expects all references
to it to be subscripted. Rather almost all. CALLP should be one of the
exceptions IMO, but is not.

I thought everyone knew about Bob Cozzi's great handling of this. Check
here if interested: http://systeminetwork.com/node/26451.

Regards,

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"Because of our taping schedule, this show will take place three weeks after
you see it."
-- sportscaster Don Gillis




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.