I have the following javascript regex…
.replace("/^(a-zA-Z\-)/gi", '');
It isn’t complete… in fact it’s wrong. Essentially what I need to do is take a string like “XJ FC-X35 (1492)” and remove the () and it’s contents and the whitespace before the parenthesis.
Takes XJ FC-X35 (1492) and returns XJ FC-X351492.
Remove the
$2to turn XJ FC-X35 (1492) into XJ FC-X35, if that’s what you wanted instead.Long explanation