?? httpregex.java
字號:
/**
*
*/
package edu.sysu.http.util;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* @author Administrator
*
*/
public class HttpRegex {
private Pattern pattern;
private String strPattern = null;
/**
*
*/
public HttpRegex() {
// TODO Auto-generated constructor stub
}
public HttpRegex(String pattern) {
// TODO Auto-generated constructor stub
this.SetPattern(pattern);
}
public void SetPattern(String pattern)
{
this.setStrPattern(pattern);
this.pattern = Pattern.compile(this.getStrPattern());
}
public boolean Match(String strMatch)
{
return this.pattern.matcher(strMatch).matches();
}
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
}
/**
* @param strPattern the strPattern to set
*/
private void setStrPattern(String strPattern) {
if(strPattern != null)
this.strPattern = strPattern;
}
/**
* @return the strPattern
*/
public String getStrPattern() {
return strPattern;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -