BartlebyScrivener wrote: > I have to at least try :) > > s = "abababababababab" > > for x in range(len(s)): > ... try: > ... s.index("aba", x, x + 3) > ... except ValueError: > ... pass > > rd >
yeah, looks like index() or find() can be used to do it instead of RE, but still, i'd like to know if there's a way you can write an RE expression to do it (and just an RE expression, without all the other for loops and extra nonsense...otherwise i might as well just use string methods) -- http://mail.python.org/mailman/listinfo/python-list