The simple solution is to have a vector for each paren. At the moment only the last
paren is
saved as the matches are put into an array.
Just dont initialise the vector until you have 2 + elements.
The workaround is to use a reluctant match and then call it repeatedly using the
match( string,
index ) method which is supposed to be internal but i dont think it is.
Michael
On 27 Mar 2001, at 11:01, Ian Swett wrote:
> I would like to be able to gather all the indices of matches inside
> repeated closures, instead of just retrieving one of them.
>
> A simple example:
> matching regexp (abc)* against zyabcabcabc will only allow the start/end
> locations of one of the three abc sequences to be retrieved. I would like
> to retrieve all of them. Obviously this is an excessively simple example,
> but it conveys the idea.
>
> Is there a relatively simple way to do this already? Or a workaround I
> could use that wouldn't be very ugly or slow?
>
> Is there enough demand to add this capability? It seems like it should be
> relatively easy to do. I could start working on it if others want it.
>
> Ian
>
>