longest_continuous_match function

Calculate longest continuous match between input and target strings