?? httprules.java
字號:
/**
*
*/
package edu.sysu.http.impl;
import edu.sysu.http.util.HttpRegex;
/**
* @author Administrator
*
*/
public class HttpRules {
public static final String CR = "\r";
public static final String LF = "\n";
public static final String SP = "\u0020";
public static final String DIGIT = "\\d";
public static final String TEXT =
"\\p{Lower}\\p{Upper}";
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
String regex = "^H.+\\" + HttpRules.SP + ".+\\" + HttpRules.SP + ".+\\"
+ HttpRules.CR + "\\" + HttpRules.LF;
HttpRegex reg = new HttpRegex(regex);
String match = "HTTP 200 OK\r\n";
System.out.println("Match state = " + reg.Match(match));
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -