I'd like to compare a string in JavaScript using a wildcard such that I could compare whether two strings are true but using a wildcard. For example, I might have inputs like this:
const input1 = "300";
const input2 = "300 - Item#300";
I'd want to be able to construct a function so that this statement would return true:
input1 === input2;
I found this question/answer: Wildcard string comparison in Javascript
However, the tool that I'm using is not using all of JavaScript ES6 and so I don't have all the tools needed in the highest voted answer. I should have everything found in the previous version (we apparently have some Frankenstein version of ES6 where we only have parts of it)..l