import re


def find_and_replace(items, updates):
    """
    aka find_and_replace

    apply all updates in updates list
    to all items in items list

    updates consist of a list of lists
    where the sub lists contain:
    (search_string, replace_string)
    """
    for u in updates:
        search_string = u[0]
        replace_string = u[1]
        #print search_string
        pattern = re.compile(search_string)
        for item in items:
            if pattern.search(item):
                index = items.index(item)
                items.remove(item)
                #print "ORIGINAL ITEM: %s" % item

                item = pattern.sub(replace_string, item)
                # not sure if python replace is faster than re.sub:
                #journal.replace(pu[0], pu[1])

                #print "     NEW ITEM: %s" % item
                items.insert(index, item)

    return items