?? filtgtlt.java
字號:
/*
* *****************************************************
* Copyright (c) 2005 IIM Lab. All Rights Reserved.
* Created by xuehao at 2005-10-12
* Contact: zxuehao@mail.ustc.edu.cn
* *****************************************************
*/
package org.indigo.filters;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* 此類主要是把采集數據中的>或者<標簽替換為>或者<標簽。
* @author wbz
*
*/
public class FiltGtLt implements Filter
{
/**
* 此函數主要是用正則表達式來實現。
*/
public String filt(String str)
{
Pattern p = null;
Matcher m = null;
p = Pattern.compile(">");
m = p.matcher( str );
str = m.replaceAll(">");
p = Pattern.compile("<");
m = p.matcher( str );
str = m.replaceAll("<");
return str;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -