whats a regex pattern that matches the same string repeated, with both instances separated by a pipe char? Example strings that the regex should match: a|a abc|abc
whats a regex pattern that matches the same string repeated, with both instances separated by a pipe char? Example strings that the regex should match: a|a abc|abc
You can use a backreference to match what's captured in a prior capture group:
(.+)\|\1