reusing parts of a string in RE matches?

BartlebyScrivener rpdooling at gmail.com
Wed May 10 19:48:54 CEST 2006


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




More information about the Python-list mailing list