public static String readStringAttr(String img, String attr) {
		Pattern pat = Pattern.compile(attr + "=\"([^\"]*)\"",
				Pattern.CASE_INSENSITIVE);
		Matcher m = pat.matcher(img);

		if (!m.find())
			return null;
		return m.group(1);
	}