I have a requirement to capture multiple phrases available in a line (or a input string).
Let's say input is = "this is description,this is description"
So I need to detect the string "this is description" has repeated twice in the input.
This is the regex I've tried so far
(.*).*\1
But it matches input that doesn't have exact repetitions like "this is description,more text,this is description"