Java tutorial
//package com.java2s; public class Main { public static boolean isMSIEOld(String userAgent) { if (userAgent.contains("MSIE ") && !userAgent.contains("Opera")) { int index = userAgent.indexOf("MSIE "); int start = index + "MSIE ".length(); int end = userAgent.indexOf('.', start); int version = Integer.parseInt(userAgent.substring(start, end)); return version < 9; } return false; } }