For example, I have the String "abcd", and I want all matches to be found in which at least 2 of those characters match, in the correct position. So, ab12, a1c2, 12cd, etc will all match because they contain at least 2 characters in the correct index from abcd.
I realize I could try doing it by /ab..|a.c.|a..d|.bc.|.b.d|..cd/g, but is there a better/simpler way to do this?
Thank you!!