On Mon, 2009-08-03 at 12:22 -0500, Scott Klement wrote:
Hi Terry,

Have you read the following (from regexec topic in the "ILE C Runtime
Library" manual):

If subexpression i is contained within another subexpression j, and i
is not contained within any other subexpression that is contained
within j, and a match of subexpression j is reported in pmatch[j],
then the match or non-match of subexpression i reported in pmatch[i]
will be as described in 1. and 2. above, but within the substring
reported in pmatch[j] rather than the whole string.

No, I should have been following that. Thank you.

In a simple case, I see that behaviour: regex "nu((t*)(i))" and string
"nuttin" return
rm_so rm_eo
----- -----
2 5
0 2
2 3

Introduction of a set of parentheses earlier in the regex should not, as
I read it, change the result returned for the last two subexpressions.
But the result for regex "n(u)((t*)(i))" is
ï rm_so rm_eo
----- -----
1 2
2 5
1 3
3 4

Thank you for your help, Scott. Any further thoughts?

Terry.




Terrence Enger wrote:

However, the two testers disagree about submatches for
regex ï"(n)(u)((t*)(i))" and test string "nuttin" ...
web mine
---- ----
ï n n
u u
tti ttu
tt ut
i t



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.