^start of string
.*any character (except for line terminators), repeated any number of times
.any character (except for line terminators)
.*any character (except for line terminators), repeated any number of times
\1the text saved by group 1
.*any character (except for line terminators), repeated any number of times
$end of string, or before its final line terminator
g modifier: global. Finds all matches instead of stopping after the first