http://www.perlmonks.org?node_id=637933


in reply to Recurring Cycle of Fractions

/\.\d*?(\d+?)\1+(?!(??{ '.' x length($1) }))/