autant que faire se peut

Etymology
lit. 'as much as doing is possible'.

Adverb

 * 1) insofar as possible, if possible, if at all possible