1、注意定义变量:int endIndex = result.lastIndexOf(")");int startIndex = result.indexOf("(")+1;String result1 = result.substring(startIndex, endIndex);Log.e("result1", ""result1)。
2、源码:Matcher matcher=Pattern.compile(regex).matcher(parse),while(matcher.find(),String ret=matcher.group(1)System.out.println(ret)。
3、代码:private TextView textView = null;private Object json;public vo足毂忍珩id onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.main);textView = (TextView)this.findViewById(R.id.textview); new Thread(){,public void run()。
4、注意格式:JSONObject JSONObject = new JSONObje罕铞泱殳ct(json);if烫喇霰嘴(JSONObject!=null){if(!JSONObject.isNull("mobile")){System.out.printl(JSONObject.optStrig("mobile"));}if(!JSONObject.isNull("province")){System.out.println(JSONObject.optString("province"))。