#!/usr/bin/env python
# Copyright 2014 Tomasz Wyderka <[email protected]>
##
import re

string = "peach"
#string = "apple"
#string = "anything" 
pattern = r"(apple)|peach"

print re.sub( pattern, r"\1", string )