I have a long meaningless string where every character is either a number [0-9] or a lowercase letter [a-z] as shown below
"0z8b816ne139z1b948bjk50f9498t139gjj90t7tb3509w6h0r7tbp"
I want a regular expression that can match non-consecutive patterns that appear more than once in a string I want the output to look like this
The bold part is the matching part
"0z8b816ne139z1b948bjk50f9498t139gjj90t7tb3509w6h0r7tbp"
Regular expression:
(.. )(?=.*?(\1))
Reference link