Replace Function With Regex Javascript Match