My first thought would be to use 2 regexes - the first to extract the substring you want to perform the second on.
So in your case, something like
But I donât get what you are trying to accomplish so I have no idea if this is applicable.
After reading the manual extract posted doing it this way may at leads give me mortals a chance of understanding what you are trying to do.
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Terrence Enger
Sent: Tuesday, 4 August 2009 7:21 a.m.
To: Midrange Systems Technical Discussion
Subject: Re: [Fwd: regular expressions, I am puzzled]
On Mon, 2009-08-03 at 12:22 -0500, Scott Klement wrote:
Have you read the following (from regexec topic in the "ILE C Runtime
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
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
Thank you for your help, Scott. Any further thoughts?