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. (cherry picked from commit eebfa66c2b)
eebfa66c2b