My problem is similar to this question:
How to find sequenced pattern of characters in a string with PHP?
But I need to extend the regex in order to take under consideration strings that begin with _
(underscore).
So how is this regex '/(\S{2,}?)\1+/'
extended in order to match my need?
EX
The string 'parent_parent_parent.parent'
should return [_parent] => 2