slightly more permissive regex and initial attempt at connect-back detec...

...tion