On Mon, Sep 27, 2010 at 7:16 PM, Henrique Dallazuanna <wwwhsd at 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