title: Regex not working with white spaces
body: <p>in PHP I would like to find the longest repeated string in a string</p>
  
  <p>For this string <code>ggaaabbbbhjglkhjglkhlggaaabbgbbhjglkhjglkhl</code> </p>
  
  <p>I use regex <code>(?=((.+)(?:.*?\2)+))</code> and it works finding <code>ggaaabb</code></p>
  
  <p>but if I introduce white spaces like this <code>ggaa abbbbhjg lkhjglkhlggaa abbgbb hjglkhjglkhl</code> in the string it will fail, why ? how can I make it white space proof ?</p>