Removing duplicated logic in internals
Removing duplicated logic in internals

Moving the logic trying the different regexp to a single
function.
Doesn't actually make things much shorter (perhaps even
longer in LOC) nor that much easier to understand but
at least everything happens in one place.

SylvainDe/DidYouMean-Python