Use an HTML parser. I personally like jsoup:
Document doc = JSoup.parse(responseString);
String nameL = doc.select("input[name=nameL]").attr("value");
String level = doc.select("input[name=level]").attr("value");
However, as VenomVendor pointed out, it is unusual (and inefficient, by the way) to use HTML for API-like communication.