Paul> I propose adding a "direction flag" to the search function: Paul> match = pattern.search(text, 50000, -1, direction=-1) Paul> here 50000 and -1 are the starting and ending locations. If start > end isn't direction == -1 implied? -- Skip Montanaro (skip at pobox.com - http://www.mojam.com/)