Use regex for global replacement