Allow for user defined pattern replacement