JSFiddle - React, Tailwind, and code Playground

JavaScript

var x = '(000) 111-1111'.replace(/^\(\d{3}\) \d{3}-\d{4}$/, "");
alert(x);