On 4/21/05, rbt <[EMAIL PROTECTED]> wrote: > string.between(data,[,])
def between(data, start, end): return re.findall(re.escape(start) + r'([^]]*)'+ re.escape(end), data) foo = '''stuff [lsass.exe] [System] more stuff xxxxx [firefox.exe] ...... ''' print between(foo, '[', ']') -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list