const regex = new RegExp('\\d{2,}|(x\\d)|(\\dx)|[^\\W\\d]+\\d\\w*|\\d+[^\\W\\d]\\w*', 'gm')
const str = `Red 1996 Corvette 2x - Matchbox
3 x SmartCar, broken 2nd door
White chevy F150, 1996
2nd edition Kindle (x3)
**1x** 2008 financial crash notice
Green bowl, cracked (stored in room 2A5)
Collectors Edition Beannie Baby, item 204/343
(6) Nissan window motors (1995-1998 ONLY)`;
const subst = `$1$2`;
// The substituted value will be contained in the result variable
const result = str.replace(regex, subst);
console.log('Substitution result: ', result);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for JavaScript, please visit: https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions