JSFiddle - React, Tailwind, and code Playground

by nevkatz

JavaScript

const sanitize = (x) => {
           return parseInt(x.replace(/\\[a-z]/g, ''));
}

console.log(parseInt('1-2'));