You could do this:

gregexpr("ab+", "abcdaabbcbb")[[1]] + 1

On Mon, Sep 27, 2010 at 2:25 PM, Titus von der Malsburg
<malsburg@gmail.com>wrote:

> On Mon, Sep 27, 2010 at 7:16 PM, Henrique Dallazuanna <wwwhsd@gmail.com>
> wrote:
> > You've tried:
> >
> > gregexpr("b+", "abcdaabbc")
>
> But this would match the third occurrence of b+ in "abcdaabbcbb".  But
> in this example I'm only interested in b+ if it's preceded by a+.
>
>  Titus
>



-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

	[[alternative HTML version deleted]]

