Now uses regex to replace characters