Uses a more reliable pattern to match the iOS major version number, also implements a fallback if none is found. See listing for details: http://www.webapps-online.com/online-tools/user-agent-strings/dv/operatingsystem51849/ios