Code example for MatchResult

Methods: group

0
					Pattern p=Pattern.compile("http://stu.fudan.edu.cn/event/([0-9]+)");
					Matcher m=p.matcher(url);
					if (m.find()){
						MatchResult mr=m.toMatchResult();
		           		waitingDialog = ProgressDialog.show(MainActivity.this, null,"请稍候, 正在载入中...",true,true); 
	            		new NetworkGetDetailJsonTask().execute(Integer.valueOf(mr.group(1)),1);
					} 
				} 
				else { 
					//Toast.makeText(MainActivity.this, "获取二维码失败.", Toast.LENGTH_SHORT).show(); 
				} 
			} 
		 
	} 
	 
	 
    @Override 
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);  
        Bundle bundle = getIntent().getExtras();