On May 18, 8:16 am, Paul McGuire <[EMAIL PROTECTED]> wrote: > On May 17, 4:06 pm, John Machin <[EMAIL PROTECTED]> wrote: > > > > > On May 18, 6:00 am, Torsten Bronger <[EMAIL PROTECTED]> > > wrote: > > > > Hallöchen! > > > > James Stroud writes: > > > > Torsten Bronger wrote: > > > > >> I need some help with finding matches in a string that has some > > > >> characters which are marked as escaped (in a separate list of > > > >> indices). Escaped means that they must not be part of any match.
Note: "must not be *part of* any match" [my emphasis] [big snip] > > Here are two pyparsing-based routines, guardedSearch and > guardedSearchByColumn. The first uses a pyparsing parse action to > reject matches at a given string location Seems to be somewhat less like what the OP might have in mind ... While we're waiting for clarification from the OP, there's a chicken- and-egg thought that's been nagging me: if the OP knows so much about the searched string that he can specify offsets which search patterns should not span, why does he still need to search it? Cheers, John -- http://mail.python.org/mailman/listinfo/python-list