go to any, great, etc. lengths
go to any, great, etc. ˈlengths (to do something)try very hard (to do something); do whatever is necessary: She went to great lengths to find this book. ♢ They were prepared to go to any lengths to help their son.
See also: length