Update js replace to use regex