Thanks for reply. I manage to find a solution.
const number = mobileNumber.trim().replace(/[^\d]/g, "");