I am trying to extract the occurrences of a string and of all the permutations of its characters from a line of text.
For example, I need to extract the string t =
t =
A regex solution:
([ABC])(?!\1)([ABC])(?!\1)(?!\2)[ABC]