this is a really hard question to phrase, but is there a way to have a regex match 'a-a' and 'b-b', but not 'a-b'? basically i want it to match with the same character either side of a middle character (such as '-') but that said character is interchangeable with other characters in a set of characters (such as [abc]). I'd like the solution to be not brute forced as the set of characters i have in mind is quite large, and the answer should be in javascript