Fixes #38732 Make matching leading newline for cli prompt optional as there are cases when returned repsonse for ios/iosx remote host doesn't have newline before cli prompt.