« Les filtres personnalisés de Maxthon v2.0 » : différence entre les versions

De Wiki Francophone de Maxthon
Test (discussion | contributions)
Aucun résumé des modifications
Ldfa (discussion | contributions)
Aucun résumé des modifications
Ligne 1 : Ligne 1 :
==Maxthon Browser Custom Filter Reference==
Version: 2.0.1<br /> Last Modified: 2006-07-17 5:42 PM
Version: 2.0.1<br /> Last Modified: 2006-07-17 5:42 PM


Ligne 9 : Ligne 11 :
The INI File is where you instruct Maxthon how to process your skin files. You can build your own skin by following the guide of this section or by modifying an exist skin.
The INI File is where you instruct Maxthon how to process your skin files. You can build your own skin by following the guide of this section or by modifying an exist skin.


属性: ○可选 √必须 -无
Attribute: &#0;&#0; may elect &#0; to have - not to have


{| cellspacing="1" cellpadding="5"
{| cellspacing="1" cellpadding="5"
Ligne 21 : Ligne 23 :
<center>RESP</center>
<center>RESP</center>
| width="265" valign="top" |
| width="265" valign="top" |
<center>说明</center>
<center>Explanation</center>
|-
|-
| width="571" valign="top" |
| width="571" valign="top" |
name
Name
| colspan="4" width="180" valign="top" |
| colspan="4" width="180" valign="top" |
<center></center>
<center>&#0;</center>
| width="265" valign="top" |
| width="265" valign="top" |
项目名称
Project name
|-
|-
| width="571" valign="top" |
| width="571" valign="top" |
type
Type
| colspan="4" width="180" valign="top" |
| colspan="4" width="180" valign="top" |
<center></center>
<center>&#0;</center>
| width="265" valign="top" |
| width="265" valign="top" |
项目类型(text, url, requestheader, responseheader)
Project type (text, url, requestheader, responseheader)
|-
|-
| width="571" valign="top" |
| width="571" valign="top" |
action
Action
| colspan="4" width="180" valign="top" |
| colspan="4" width="180" valign="top" |
<center></center>
<center>&#0;</center>
| width="265" valign="top" |
| width="265" valign="top" |
处理方式,见action类型定义
The processing way, sees the action type definition
|-
|-
| width="571" valign="top" |
| width="571" valign="top" |
postaction
Postaction
| colspan="4" width="180" valign="top" |
| colspan="4" width="180" valign="top" |
<center></center>
<center>&#0;</center>
| width="265" valign="top" |
| width="265" valign="top" |
后期处理方式。见postaction类型定义
Later period processing way. Sees the postaction type definition
|-
|-
| width="571" valign="top" |
| width="571" valign="top" |
priority
Priority
| colspan="4" width="180" valign="top" |
| colspan="4" width="180" valign="top" |
<center></center>
<center>&#0;</center>
| width="265" valign="top" |
| width="265" valign="top" |
项目优先级,大于零的整数,数值越大优先级越高(0~999)
The project priority, is bigger than zero the integer, a value bigger priority is higher (0 ~ 999)
|-
|-
| width="571" valign="top" |
| width="571" valign="top" |
enable
Enable
| colspan="4" width="180" valign="top" |
| colspan="4" width="180" valign="top" |
<center></center>
<center>&#0;</center>
| width="265" valign="top" |
| width="265" valign="top" |
该项目是否启用。值:1(启用),0(禁用)。缺省为0
Whether this project does begin using. Value: 1 (begins using), 0 (is durable). Lacks the province is 0
|-
|-
| width="571" valign="top" |
| width="571" valign="top" |
header
Header
| width="180" valign="top" |
| width="180" valign="top" |
<center></center>
<center>-</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>-</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="265" valign="top" |
| width="265" valign="top" |
要匹配的Header Name
Must match Header Name
|-
|-
| width="571" valign="top" |
| width="571" valign="top" |
match_url
Match_url
| width="180" valign="top" |
| width="180" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="265" valign="top" |
| width="265" valign="top" |
URL匹配串
URL match string
|-
|-
| width="571" valign="top" |
| width="571" valign="top" |
exclude_url
Exclude_url
| width="180" valign="top" |
| width="180" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="265" valign="top" |
| width="265" valign="top" |
URL例外(符合该串的不过滤)
The URL exception (conforms to this string not to filter)
|-
|-
| width="571" valign="top" |
| width="571" valign="top" |
bound
Bound
| width="180" valign="top" |
| width="180" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>-</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>-</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>-</center>
| width="265" valign="top" |
| width="265" valign="top" |
用于查找match的范围的匹配串
Uses in to search match the scope match string
|-
|-
| width="571" valign="top" |
| width="571" valign="top" |
max_bound_size
Max_bound_size
| width="180" valign="top" |
| width="180" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>-</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>-</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>-</center>
| width="265" valign="top" |
| width="265" valign="top" |
bound最大的匹配范围(最大值2048)<br /> 缺省值为最大值
Bound biggest match scope (maximum value 2,048)<br /> Lacks the province value is the maximum value
|-
|-
| width="571" valign="top" |
| width="571" valign="top" |
match
Match
| width="180" valign="top" |
| width="180" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>-</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="265" valign="top" |
| width="265" valign="top" |
文本匹配串
Text match string
|-
|-
| width="571" valign="top" |
| width="571" valign="top" |
match_count
Match_count
| width="180" valign="top" |
| width="180" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>-</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>-</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>-</center>
| width="265" valign="top" |
| width="265" valign="top" |
每个页面的匹配次数限制
Each page match number of times limit
|-
|-
| width="571" valign="top" |
| width="571" valign="top" |
exclude
Exclude
| width="180" valign="top" |
| width="180" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>-</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="265" valign="top" |
| width="265" valign="top" |
match例外(符合该串的不过滤)
The match exception (conforms to this string not to filter)
|-
|-
| width="571" valign="top" |
| width="571" valign="top" |
replace
Replace
| width="180" valign="top" |
| width="180" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="265" valign="top" |
| width="265" valign="top" |
用于替换的字符串
Uses in character string which replaces
|-
|-
| width="571" valign="top" |
| width="571" valign="top" |
return
Return
| width="180" valign="top" |
| width="180" valign="top" |
<center></center>
<center>-</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="265" valign="top" |
| width="265" valign="top" |
返回该字符串给浏览器
Returns to this character string to give the browser
|-
|-
| colspan="6" width="571" valign="top" |
| colspan="6" width="571" valign="top" |
Action(处理方式)类型定义
Action (processing way) type definition
|-
|-
| width="571" valign="top" |
| width="571" valign="top" |
| width="180" valign="top" |
| width="180" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="265" valign="top" |
| width="265" valign="top" |
无操作
&#0;&#0;&#0;
|-
|-
| width="571" valign="top" |
| width="571" valign="top" |
1
1
| width="180" valign="top" |
| width="180" valign="top" |
<center></center>
<center>-</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>-</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="265" valign="top" |
| width="265" valign="top" |
删除 该header
Deletes this header
|-
|-
| width="571" valign="top" |
| width="571" valign="top" |
2
2
| width="180" valign="top" |
| width="180" valign="top" |
<center></center>
<center>-</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>-</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="265" valign="top" |
| width="265" valign="top" |
增加 该Header,值为replace
Increases this Header, the value is replace
|-
|-
| width="571" valign="top" |
| width="571" valign="top" |
3
3
| width="180" valign="top" |
| width="180" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="265" valign="top" |
| width="265" valign="top" |
替换 用replace替换match(match_url)所匹配的字符串<br /> (也用于文件头$FILESTART、文件尾$FILEEND模式)
For uses in exchange replace to replace the character string which match (match_url) matches<br /> (Also uses in article article of $FILESTART, the document tail $FILEEND pattern)
|-
|-
| colspan="6" width="571" valign="top" |
| colspan="6" width="571" valign="top" |
PostAction(处理方式)类型定义
PostAction (processing way) type definition
|-
|-
| width="571" valign="top" |
| width="571" valign="top" |
| width="180" valign="top" |
| width="180" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="265" valign="top" |
| width="265" valign="top" |
无操作
&#0;&#0;&#0;
|-
|-
| width="571" valign="top" |
| width="571" valign="top" |
1
1
| width="180" valign="top" |
| width="180" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="265" valign="top" |
| width="265" valign="top" |
不再处理同类的filter
No longer processes similar filter
|-
|-
| width="571" valign="top" |
| width="571" valign="top" |
2
2
| width="180" valign="top" |
| width="180" valign="top" |
<center></center>
<center>-</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="265" valign="top" |
| width="265" valign="top" |
关闭 当前连接
Closes the current connection
|-
|-
| width="571" valign="top" |
| width="571" valign="top" |
3
3
| width="180" valign="top" |
| width="180" valign="top" |
<center></center>
<center>-</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="45" valign="top" |
| width="45" valign="top" |
<center></center>
<center>&#0;</center>
| width="265" valign="top" |
| width="265" valign="top" |
返回return字符串,关闭当前连接
Returns to the return character string, the closure current connection
|}
|}


===函数语法===
===Function grammar===


{| cellspacing="1" cellpadding="5"
{| cellspacing="1" cellpadding="5"
| width="199" valign="top" |
| width="199" valign="top" |
关键字
Essential character
| width="369" valign="top" |
| width="369" valign="top" |
含义
Meaning
|-
|-
| width="199" valign="top" |
| width="199" valign="top" |
$KEYWORDS(LISTNAME)
$keywords (LISTNAME)
| width="369" valign="top" |
| width="369" valign="top" |
将内容替换为括号内指定的关键字列表内容。<br /> LISTNAME为该关键字列表的名称(blacklist whitelist为系统保留名称,如果filter重用该名称则以filter自定义的为准)
The essential character which assigns for the parenthesis in tabulates the content the content replace.<br /> LISTNAME is the name which this essential character tabulates (blacklist whitelist is system retention name, if filter entrusts with heavy responsibility this name by filter from definition is)
|-
|-
| width="199" valign="top" |
| width="199" valign="top" |
$BASE64(string)
$base64 (string)
| width="369" valign="top" |
| width="369" valign="top" |
说明括号内部的内容是经过base64编码的,使用时需要解码。
Explained the parenthesis interior the content is passes through base64 encoded, when use needs to decode.
|-
|-
| width="199" valign="top" |
| width="199" valign="top" |
$STR(string)
$str (string)
| width="369" valign="top" |
| width="369" valign="top" |
用来表示string是html中的一个字符串,即string前后可能为””,’’,或者前后为空。
Uses for to express string is in a html character string, namely around string possibly is "", ' ', or around for is spatial.
|-
|-
| width="199" valign="top" |
| width="199" valign="top" |
$FILECONTENT(string)
$filecontent (string)
| width="369" valign="top" |
| width="369" valign="top" |
读取文件(string)的内容来替换该串。仅用于replace。
Reads takes the document (string) the content to replace this string. Only uses in replace.
|-
|-
| width="199" valign="top" |
| width="199" valign="top" |
$TAG(string)
$tag (string)
| width="369" valign="top" |
| width="369" valign="top" |
获取类似< string href=#>...</a>的标记,包括<string href=#>未关闭标记。仅用于Bound
Gains < string href= similar "#" >... the </a> mark, including <string href= "#" > has not closed the mark. Only uses in Bound
|}
|}


==附:正则表达式(Regular Expression)说明==
==Attaches: The regular expression (Regular Expression) explained==


===基本语法===
===Basic grammar===


<center>
<center>
Ligne 348 : Ligne 350 :
<center>/pattern/</center>
<center>/pattern/</center>
| width="465" valign="top" |
| width="465" valign="top" |
结果
Finally
|-
|-
| width="103" valign="top" |
| width="103" valign="top" |
<center>.</center>
<center>.</center>
| width="465" valign="top" |
| width="465" valign="top" |
匹配除 "\n" 之外的任何单个字符。要匹配包括 '\n' 在内的任何字符,请使用象 '[.\n]' 的模式。
Match except "\n" outside any single character. Must match including '\n' any character, please use looks like ' [. \n ] the ' pattern.
|-
|-
| width="103" valign="top" |
| width="103" valign="top" |
<center>[ ]</center>
<center>[ ]</center>
| width="465" valign="top" |
| width="465" valign="top" |
指定一个字符类,匹配方括号内的任意字符。例:[abc] 匹配 "a", "b""c"
Assigns a character class, matches in the square brackets the free character. Example: [ abc ] matches "a", "b" or "c".
|-
|-
| width="103" valign="top" |
| width="103" valign="top" |
<center>^</center>
<center>^</center>
| width="465" valign="top" |
| width="465" valign="top" |
如果^出现在字符类的开始处,它否定了字符类,这个被否定的字符类匹配除却方括号内的字符的字符。如:[^abc]匹配除了"a", "b""c"之外的字符。如果^出现在正则表达式前边,它匹配输入的开头,例:^[abc]匹配以"a", "b""c"开头的输入。
If ^ appears in the character class start place, it denied the character class, this by negative character class match abatement square brackets in character character. For example: [ ^abc ] matches besides "a", "b" and the "c" character. If ^ appears in front of the regular expression, it matches the input the opening, the example: ^ [ abc ] matches by "a", the input which "b" or "c" begins.
|-
|-
| width="103" valign="top" |
| width="103" valign="top" |
<center>$</center>
<center>$</center>
| width="465" valign="top" |
| width="465" valign="top" |
放在正则表达式的最后,它匹配输入的末端。例如:[0-9]$匹配输入的最后一个数字。
Puts in the regular expression final, it matches the input the terminal. For example: [ 0-9 ] $ match input last numeral.
|-
|-
| width="103" valign="top" |
| width="103" valign="top" |
<center>-</center>
<center>-</center>
| width="465" valign="top" |
| width="465" valign="top" |
在字符类中,指定一个字符的范围。例如:[0-9]匹配"0""9"的数字。
In the character class, assigns a character the scope. For example: [ 0-9 ] matches "0" to the "9" numeral.
|-
|-
| width="103" valign="top" |
| width="103" valign="top" |
<center>?</center>
<center>?</center>
| width="465" valign="top" |
| width="465" valign="top" |
匹配前面的子表达式零次或一次。例如,"do(es)?" 可以匹配 "do" "does" 中的"do" ? 等价于 {0,1}
Front match sub- expression &#0;&#0;or. For example, "do (es)?" May match "do" or in "does" "do". ? Equally in value to {0,1}.
|-
|-
| width="103" valign="top" |
| width="103" valign="top" |
<center>+</center>
<center>+</center>
| width="465" valign="top" |
| width="465" valign="top" |
匹配前面的子表达式一次或多次。例如,'zo+' 能匹配 "zo" 以及 "zoo",但不能匹配 "z"+ 等价于 {1,}
Front match sub- expression or many times. For example, 'zo+' can match "zo" as well as "zoo", but cannot match "z". + Equally in value to {1,}.
|-
|-
| width="103" valign="top" |
| width="103" valign="top" |
<center><nowiki>*</nowiki></center>
<center><nowiki>*</nowiki></center>
| width="465" valign="top" |
| width="465" valign="top" |
匹配前面的子表达式零次或多次。例如,zo* 能匹配 "z" 以及 "zoo"* 等价于{0,}
Front match sub- expression &#0;&#0;or many times. For example, zo* can match "z" as well as "zoo". * Equally in value to {0,}.
|-
|-
| width="103" valign="top" |
| width="103" valign="top" |
<center>??, +?, *?{n}?,{n,}?,{n,m}?</center>
<center>? ? +? *? {n}? {n,}? {n, m}?</center>
| width="465" valign="top" |
| width="465" valign="top" |
?, +,*, {n}, {n,}, {n,m}的非贪婪匹配版本,它们尽可能匹配较少的字符;而?, +,*, {n}, {n,}, {n,m}则是贪婪版本,尽可能匹配较多的字符。例如:输入"<abc><def>", <.*?> 匹配"<abc>",而<.*>匹配"<abc><def>"
? + * {n}, {n,}, {n, m} the non- greedy match edition, they match less characters as far as possible; But? + * {n}, {n,}, {n, m} is the greedy edition, matches more characters as far as possible. For example: Inputs "<abc><def>", then <. *? > Matches "<abc>", but <. *> matches "<abc><def>".
|-
|-
| width="103" valign="top" |
| width="103" valign="top" |
<center>( )</center>
<center>()</center>
| width="465" valign="top" |
| width="465" valign="top" |
分组操作符。例如:(\d+,)*\d+匹配一串由逗号分开的数字,例如: "1""1,23,456"
Grouping instruction character. For example: (\d+) *\d+ matches a string by the comma separated numeral, for example: "1" or "1,.23,456 million".
|-
|-
| width="103" valign="top" |
| width="103" valign="top" |
<center>(pattern)</center>
<center>(pattern)</center>
| width="465" valign="top" |
| width="465" valign="top" |
匹配pattern 并获取这一匹配。所获取的匹配可以从产生的 Matches 集合得到
Matches pattern and gains this match. Gains the match may from the Matches set which produces obtain
|-
|-
| width="103" valign="top" |
| width="103" valign="top" |
<center>(?:pattern)</center>
<center>(? :pattern)</center>
| width="465" valign="top" |
| width="465" valign="top" |
匹配 pattern 但不获取匹配结果,也就是说这是一个非获取匹配,不进行存储供以后使用。这在使用 "" 字符 (|) 来组合一个模式的各个部分是很有用。例如, 'industr(?:y|ies) 就是一个比 'industry|industries' 更简略的表达式。
Matches pattern but not to gain the match result, in other words this is a non- gain match, will not carry on the memory to use for later. This is using "or the" character (|) combines a pattern each part is very useful. For example, 'industr (? :y|ies) is compared to a 'industry|industries' briefer expression.
|-
|-
| width="103" valign="top" |
| width="103" valign="top" |
<center>(?=pattern)</center>
<center>(? =pattern)</center>
| width="465" valign="top" |
| width="465" valign="top" |
正向预查,在任何匹配 pattern 的字符串开始处匹配查找字符串。这是一个非获取匹配,也就是说,该匹配不需要获取供以后使用。例如, 'Windows (?=95|98|NT|2000)' 能匹配 "Windows 2000" 中的 "Windows" ,但不能匹配 "Windows 3.1" 中的 "Windows"。预查不消耗字符,也就是说,在一个匹配发生后,在最后一次匹配之后立即开始下一次匹配的搜索,而不是从包含预查的字符之后开始。
To is looking up in advance, in any matches pattern the character string start place match search character string. This is a non- gain match, in other words, this match will not need to gain for later uses. For example, 'Windows (? =95|98|NT|2000) ' can match in "Windows 2,000" "Windows", but cannot match in "Windows 3.1" "Windows". Looks up in advance does not consume the character, in other words, occurs after a match, after last match starts the search immediately which next time matches, but is not after the character which contains looks up in advance starts.
|-
|-
| width="103" valign="top" |
| width="103" valign="top" |
<center>(?!pattern)</center>
<center>(? ! Pattern)</center>
| width="465" valign="top" |
| width="465" valign="top" |
负向预查,在任何不匹配pattern的字符串开始处匹配查找字符串。这是一个非获取匹配,也就是说,该匹配不需要获取供以后使用。例如'Windows (?!95|98|NT|2000)' 能匹配 "Windows 3.1" 中的 "Windows",但不能匹配 "Windows 2000" 中的 "Windows"。预查不消耗字符,也就是说,在一个匹配发生后,在最后一次匹配之后立即开始下一次匹配的搜索,而不是从包含预查的字符之后开始
The negative direction looks up in advance, in any does not match pattern the character string start place match search character string. This is a non- gain match, in other words, this match will not need to gain for later uses. For example 'Windows (? ! 95|98|NT|2000) ' can match in "Windows 3.1" "Windows", but cannot match in "Windows 2,000" "Windows". Looks up in advance does not consume the character, in other words, occurs after a match, after last match starts the search immediately which next time matches, but is not after the character which contains looks up in advance starts
|-
|-
| width="103" valign="top" |
| width="103" valign="top" |
<center>\</center>
<center>\</center>
| width="465" valign="top" |
| width="465" valign="top" |
转义字符,转义紧跟的字符。例如,[0-9]+ 匹配一个或多个数字,而 [0-9]\+ 匹配一个数字后跟随一个加号的情况。<br /> 反斜杠\也用于表示缩写,\a 就表示任何数字、字母。<br /> 如果\后紧跟一个数字n,则它匹配第n个匹配群组(从0开始),例如,<{.*?}>.*?</\0>匹配"<head>Contents</head>"。注意,在C++字符串中,反斜杠\需要用双反斜杠\\来表示: "\\+", "\\a", "<{.*?}>.*?</\\0>"
&#0;&#0; the character, &#0;&#0; follows close on character. For example, [ 0-9 ] + matches or many numerals, but [ 0-9 ] \+ matches a digital heel along with a plus sign situation.<br /> Counter- slanting bar \ also uses in to indicate condenses, \a expresses any numeral, the letter.<br /> If after \ follows close on digital n, then its &#0;&#0; n match group group (from 0 starts), for example, < {. *?} . *? </\0> matches "<head>Contents</head>". The attention, in the C++ character string, counter- slanting bar \ needs to use pair of counter- slanting bar \\ to indicate that, "\\+", "\\a", "< {. *?} . *? </\\0> ".
|-
|-
| width="103" valign="top" |
| width="103" valign="top" |
<center><nowiki>|</nowiki></center>
<center><nowiki>|</nowiki></center>
| width="465" valign="top" |
| width="465" valign="top" |
间隔符,分隔两个表达式,以正确匹配其中一个,例如:T|the匹配"The" "the"
The gap symbol, separates two expressions, to correctly matches, for example: T|the matches "The" or "the".
|-
|-
| width="103" valign="top" |
| width="103" valign="top" |
<center>{n}</center>
<center>{n}</center>
| width="465" valign="top" |
| width="465" valign="top" |
n 是一个非负整数。匹配确定的 n 次。例如,'o{2}' 不能匹配 "Bob" 中的 'o',但是能匹配 "food" 中的两个 o。
N is a non- negative integer. Match definite n. For example, 'o {2} ' cannot match in "Bob" 'o', but can match in "food" two o.
|-
|-
| width="103" valign="top" |
| width="103" valign="top" |
<center>{n,}</center>
<center>{n,}</center>
| width="465" valign="top" |
| width="465" valign="top" |
n 是一个非负整数。至少匹配n 次。例如,'o{2,}' 不能匹配 "Bob" 中的 'o',但能匹配 "foooood" 中的所有 o。'o{1,}' 等价于 'o+''o{0,}' 则等价于 'o*'
N is a non- negative integer. At least matches n time. For example, 'o {2,} ' cannot match in "Bob" 'o', but can match in "foooood" all o. 'o {1,} ' equally in value to 'o+'. 'o {0,} ' then equally in value to 'o*'.
|-
|-
| width="103" valign="top" |
| width="103" valign="top" |
<center>{n,m}</center>
<center>{n, m}</center>
| width="465" valign="top" |
| width="465" valign="top" |
m 和 n 均为非负整数,其中n <= m。最少匹配 n 次且最多匹配 m 次。 "o{1,3}" 将匹配 "fooooood" 中的前三个 o。'o{0,1}' 等价于 'o?'。请注意在逗号和两个数之间不能有空格。
M and n are the non- negative integer, n <= m. Least matches n to hesitate to go forward most matches m time. "o {1,3}" will match in "fooooood" first three o. 'o {0,1} ' equally in value to 'o?' The G &#0; (14) &#0; &#0; Chinese lotus root earth reef &#0; &#0; between cannot have the blank space.
|}
|}


</center>
</center>


===缩写语法===
===Abbreviation grammar===


<center>
<center>
Ligne 454 : Ligne 456 :
{| border="1"
{| border="1"
| width="115" valign="top" |
| width="115" valign="top" |
范例
Model
| width="432" valign="top" |
| width="432" valign="top" |
说明
Explanation
|-
|-
| width="115" valign="top" |
| width="115" valign="top" |
\a
\a
| width="432" valign="top" |
| width="432" valign="top" |
字母、数字([a-zA-Z0-9])
Letter, numeral ([ a-zA-Z0-9 ])
|-
|-
| width="115" valign="top" |
| width="115" valign="top" |
\b
\b
| width="432" valign="top" |
| width="432" valign="top" |
空格(blank): ([ \\t])
Blank space (blank): ([ \\t ])
|-
|-
| width="115" valign="top" |
| width="115" valign="top" |
\B
\B
| width="432" valign="top" |
| width="432" valign="top" |
非空格字符
Non- blank space character
|-
|-
| width="115" valign="top" |
| width="115" valign="top" |
\c
\c
| width="432" valign="top" |
| width="432" valign="top" |
字母([a-zA-Z])
Letter ([ a-zA-Z ])
|-
|-
| width="115" valign="top" |
| width="115" valign="top" |
\cx
\cx
| width="432" valign="top" |
| width="432" valign="top" |
匹配由x指明的控制字符。例如, \cM 匹配一个 Control-M 或回车符。 x 的值必须为 A-Z a-z 之一。否则,将 c 视为一个原义的 'c' 字符。
The match by the control character which x indicates. For example, \M matches Control-M or the carriage return symbol. X value must be A-Z or a-z one. Otherwise, regards as c a primary meaning the 'c' character.
|-
|-
| width="115" valign="top" |
| width="115" valign="top" |
\d
\d
| width="432" valign="top" |
| width="432" valign="top" |
十进制数 ([0-9])
Decimal digit ([ 0-9 ])
|-
|-
| width="115" valign="top" |
| width="115" valign="top" |
\D
\D
| width="432" valign="top" |
| width="432" valign="top" |
匹配一个非数字字符。等价于 [^0-9]
Matches a non- alphanumeric character. Equally in value to [ ^0-9 ].
|-
|-
| width="115" valign="top" |
| width="115" valign="top" |
\f
\f
| width="432" valign="top" |
| width="432" valign="top" |
匹配一个换页符。等价于 \x0c \cL。
Matches a form feed symbol. Equally in value to \x0c and \L.
|-
|-
| width="115" valign="top" |
| width="115" valign="top" |
\h
\h
| width="432" valign="top" |
| width="432" valign="top" |
十六进制数([0-9a-fA-F])
Sexadecimal number ([ 0-9a-fA-F ])
|-
|-
| width="115" valign="top" |
| width="115" valign="top" |
\n
\n
| width="432" valign="top" |
| width="432" valign="top" |
换行: (\r|(\r?\n))
Line feeds: (\r| (\r? \n))
|-
|-
| width="115" valign="top" |
| width="115" valign="top" |
\num
\num
| width="432" valign="top" |
| width="432" valign="top" |
匹配 num,其中 num 是一个正整数。对所获取的匹配的引用。例如,'(.)\1' 匹配两个连续的相同字符。
Matches num, num is a positive integer. To match quotation which gains. For example, ' (.) 1' matches two continual same characters.
|-
|-
| width="115" valign="top" |
| width="115" valign="top" |
\r
\r
| width="432" valign="top" |
| width="432" valign="top" |
匹配一个回车符。等价于 \x0d \cM。
Matches a carriage return symbol. Equally in value to \x0d and \M.
|-
|-
| width="115" valign="top" |
| width="115" valign="top" |
\s
\s
| width="432" valign="top" |
| width="432" valign="top" |
匹配任何空白字符,包括空格、制表符、换页符等等。等价于 [ \f\n\r\t\v]
Matches any blank character, including blank space, scheduling symbol, form feed symbol and so on. Equally in value to [ \f\n\r\t\v ].
|-
|-
| width="115" valign="top" |
| width="115" valign="top" |
\S
\S
| width="432" valign="top" |
| width="432" valign="top" |
匹配任何非空白字符。等价于 [^ \f\n\r\t\v]
Matches any non- blank character. Equally in value to [ ^ \f\n\r\t\v ].
|-
|-
| width="115" valign="top" |
| width="115" valign="top" |
\t
\t
| width="432" valign="top" |
| width="432" valign="top" |
匹配一个制表符。等价于 \x09 \cI。
Matches a scheduling symbol. Equally in value to \x09 and \I.
|-
|-
| width="115" valign="top" |
| width="115" valign="top" |
\v
\v
| width="432" valign="top" |
| width="432" valign="top" |
匹配一个垂直制表符。等价于 \x0b \cK。
Matches a vertical scheduling symbol. Equally in value to \x0b and \K.
|-
|-
| width="115" valign="top" |
| width="115" valign="top" |
\q
\q
| width="432" valign="top" |
| width="432" valign="top" |
<nowiki>引用字符串(\"[^\"]*\")|(\''''[^\'''']*\'''')</nowiki>
<nowiki>Quotation character string (\ "[ ^\" ] *\") | (\'''' [ ^\'''' ] *\'''')</nowiki>
|-
|-
| width="115" valign="top" |
| width="115" valign="top" |
\un
\un
| width="432" valign="top" |
| width="432" valign="top" |
匹配 n,其中 n 是一个用四个十六进制数字表示的 Unicode 字符。例如, \u00A9 匹配版权符号 (?)
Matches n, n is uses four hexadecimal systems digital presentation the Unicode character. For example, \u00A9 match copyright mark (?) &#0;
|-
|-
| width="115" valign="top" |
| width="115" valign="top" |
\w
\w
| width="432" valign="top" |
| width="432" valign="top" |
匹配包括下划线的任何单词字符。等价于'[A-Za-z0-9_]'
Match any word character which draws a line including under. Equally in value to ' [ A-Za-z0-9_ ] '.
|-
|-
| width="115" valign="top" |
| width="115" valign="top" |
\W
\W
| width="432" valign="top" |
| width="432" valign="top" |
匹配任何非单词字符。等价于 '[^A-Za-z0-9_]'
Matches any non- word character. Equally in value to ' [ ^A-Za-z0-9_ ] '
|-
|-
| width="115" valign="top" |
| width="115" valign="top" |
\xn
\xn
| width="432" valign="top" |
| width="432" valign="top" |
匹配 n,其中 n 为十六进制转义值。十六进制转义值必须为确定的两个数字长。例如, '\x41' 匹配 "A"'\x041' 则等价于 '\x04' & "1"。正则表达式中可以使用 ASCII 编码。
Matches n, n is the hexadecimal system &#0;&#0; value. The hexadecimal system &#0;&#0; value must be the definite two numbers word length. For example, '\x41' matches "A". '\x041' then equally in value to '\x04' & "1". The regular expression in the formula may use ASCII to code.
|-
|-
| width="115" valign="top" |
| width="115" valign="top" |
\z
\z
| width="432" valign="top" |
| width="432" valign="top" |
一个整数([0-9]+)
An integer ([ 0-9 ] +)
|}
|}



Version du 7 septembre 2006 à 08:10

Maxthon Browser Custom Filter Reference

Version: 2.0.1
Last Modified: 2006-07-17 5:42 PM

Overview

The new filter system of Maxthon Browser 2.0 can be customized.

Custom Filter Proprties

The INI File is where you instruct Maxthon how to process your skin files. You can build your own skin by following the guide of this section or by modifying an exist skin.

Attribute: &#0;&#0; may elect &#0; to have - not to have

TXT
URL
REQ
RESP
Explanation

Name

&#0;

Project name

Type

&#0;

Project type (text, url, requestheader, responseheader)

Action

&#0;

The processing way, sees the action type definition

Postaction

&#0;

Later period processing way. Sees the postaction type definition

Priority

&#0;

The project priority, is bigger than zero the integer, a value bigger priority is higher (0 ~ 999)

Enable

&#0;

Whether this project does begin using. Value: 1 (begins using), 0 (is durable). Lacks the province is 0

Header

-
-
&#0;
&#0;

Must match Header Name

Match_url

&#0;
&#0;
&#0;
&#0;

URL match string

Exclude_url

&#0;
&#0;
&#0;
&#0;

The URL exception (conforms to this string not to filter)

Bound

&#0;
-
-
-

Uses in to search match the scope match string

Max_bound_size

&#0;
-
-
-

Bound biggest match scope (maximum value 2,048)
Lacks the province value is the maximum value

Match

&#0;
-
&#0;
&#0;

Text match string

Match_count

&#0;
-
-
-

Each page match number of times limit

Exclude

&#0;
-
&#0;
&#0;

The match exception (conforms to this string not to filter)

Replace

&#0;
&#0;
&#0;
&#0;

Uses in character string which replaces

Return

-
&#0;
&#0;
&#0;

Returns to this character string to give the browser

Action (processing way) type definition

&#0;
&#0;
&#0;
&#0;

&#0;&#0;&#0;

1

-
-
&#0;
&#0;

Deletes this header

2

-
-
&#0;
&#0;

Increases this Header, the value is replace

3

&#0;
&#0;
&#0;
&#0;

For uses in exchange replace to replace the character string which match (match_url) matches
(Also uses in article article of $FILESTART, the document tail $FILEEND pattern)

PostAction (processing way) type definition

&#0;
&#0;
&#0;
&#0;

&#0;&#0;&#0;

1

&#0;
&#0;
&#0;
&#0;

No longer processes similar filter

2

-
&#0;
&#0;
&#0;

Closes the current connection

3

-
&#0;
&#0;
&#0;

Returns to the return character string, the closure current connection

Function grammar

Essential character

Meaning

$keywords (LISTNAME)

The essential character which assigns for the parenthesis in tabulates the content the content replace.
LISTNAME is the name which this essential character tabulates (blacklist whitelist is system retention name, if filter entrusts with heavy responsibility this name by filter from definition is)

$base64 (string)

Explained the parenthesis interior the content is passes through base64 encoded, when use needs to decode.

$str (string)

Uses for to express string is in a html character string, namely around string possibly is "", ' ', or around for is spatial.

$filecontent (string)

Reads takes the document (string) the content to replace this string. Only uses in replace.

$tag (string)

Gains < string href= similar "#" >... the </a> mark, including <string href= "#" > has not closed the mark. Only uses in Bound

Attaches: The regular expression (Regular Expression) explained

Basic grammar

/pattern/

Finally

.

Match except "\n" outside any single character. Must match including '\n' any character, please use looks like ' [. \n ] the ' pattern.

[ ]

Assigns a character class, matches in the square brackets the free character. Example: [ abc ] matches "a", "b" or "c".

^

If ^ appears in the character class start place, it denied the character class, this by negative character class match abatement square brackets in character character. For example: [ ^abc ] matches besides "a", "b" and the "c" character. If ^ appears in front of the regular expression, it matches the input the opening, the example: ^ [ abc ] matches by "a", the input which "b" or "c" begins.

$

Puts in the regular expression final, it matches the input the terminal. For example: [ 0-9 ] $ match input last numeral.

-

In the character class, assigns a character the scope. For example: [ 0-9 ] matches "0" to the "9" numeral.

?

Front match sub- expression &#0;&#0;or. For example, "do (es)?" May match "do" or in "does" "do". ? Equally in value to {0,1}.

+

Front match sub- expression or many times. For example, 'zo+' can match "zo" as well as "zoo", but cannot match "z". + Equally in value to {1,}.

*

Front match sub- expression &#0;&#0;or many times. For example, zo* can match "z" as well as "zoo". * Equally in value to {0,}.

? ? +? *? {n}? {n,}? {n, m}?

? + * {n}, {n,}, {n, m} the non- greedy match edition, they match less characters as far as possible; But? + * {n}, {n,}, {n, m} is the greedy edition, matches more characters as far as possible. For example: Inputs "<abc><def>", then <. *? > Matches "<abc>", but <. *> matches "<abc><def>".

()

Grouping instruction character. For example: (\d+) *\d+ matches a string by the comma separated numeral, for example: "1" or "1,.23,456 million".

(pattern)

Matches pattern and gains this match. Gains the match may from the Matches set which produces obtain

(? :pattern)

Matches pattern but not to gain the match result, in other words this is a non- gain match, will not carry on the memory to use for later. This is using "or the" character (|) combines a pattern each part is very useful. For example, 'industr (? :y|ies) is compared to a 'industry|industries' briefer expression.

(? =pattern)

To is looking up in advance, in any matches pattern the character string start place match search character string. This is a non- gain match, in other words, this match will not need to gain for later uses. For example, 'Windows (? =95|98|NT|2000) ' can match in "Windows 2,000" "Windows", but cannot match in "Windows 3.1" "Windows". Looks up in advance does not consume the character, in other words, occurs after a match, after last match starts the search immediately which next time matches, but is not after the character which contains looks up in advance starts.

(? ! Pattern)

The negative direction looks up in advance, in any does not match pattern the character string start place match search character string. This is a non- gain match, in other words, this match will not need to gain for later uses. For example 'Windows (? ! 95|98|NT|2000) ' can match in "Windows 3.1" "Windows", but cannot match in "Windows 2,000" "Windows". Looks up in advance does not consume the character, in other words, occurs after a match, after last match starts the search immediately which next time matches, but is not after the character which contains looks up in advance starts

\

&#0;&#0; the character, &#0;&#0; follows close on character. For example, [ 0-9 ] + matches or many numerals, but [ 0-9 ] \+ matches a digital heel along with a plus sign situation.
Counter- slanting bar \ also uses in to indicate condenses, \a expresses any numeral, the letter.
If after \ follows close on digital n, then its &#0;&#0; n match group group (from 0 starts), for example, < {. *?} . *? </\0> matches "<head>Contents</head>". The attention, in the C++ character string, counter- slanting bar \ needs to use pair of counter- slanting bar \\ to indicate that, "\\+", "\\a", "< {. *?} . *? </\\0> ".

|

The gap symbol, separates two expressions, to correctly matches, for example: T|the matches "The" or "the".

{n}

N is a non- negative integer. Match definite n. For example, 'o {2} ' cannot match in "Bob" 'o', but can match in "food" two o.

{n,}

N is a non- negative integer. At least matches n time. For example, 'o {2,} ' cannot match in "Bob" 'o', but can match in "foooood" all o. 'o {1,} ' equally in value to 'o+'. 'o {0,} ' then equally in value to 'o*'.

{n, m}

M and n are the non- negative integer, n <= m. Least matches n to hesitate to go forward most matches m time. "o {1,3}" will match in "fooooood" first three o. 'o {0,1} ' equally in value to 'o?' The G &#0; (14) &#0; &#0; Chinese lotus root earth reef &#0; &#0; between cannot have the blank space.

Abbreviation grammar

Model

Explanation

\a

Letter, numeral ([ a-zA-Z0-9 ])

\b

Blank space (blank): ([ \\t ])

\B

Non- blank space character

\c

Letter ([ a-zA-Z ])

\cx

The match by the control character which x indicates. For example, \M matches Control-M or the carriage return symbol. X value must be A-Z or a-z one. Otherwise, regards as c a primary meaning the 'c' character.

\d

Decimal digit ([ 0-9 ])

\D

Matches a non- alphanumeric character. Equally in value to [ ^0-9 ].

\f

Matches a form feed symbol. Equally in value to \x0c and \L.

\h

Sexadecimal number ([ 0-9a-fA-F ])

\n

Line feeds: (\r| (\r? \n))

\num

Matches num, num is a positive integer. To match quotation which gains. For example, ' (.) 1' matches two continual same characters.

\r

Matches a carriage return symbol. Equally in value to \x0d and \M.

\s

Matches any blank character, including blank space, scheduling symbol, form feed symbol and so on. Equally in value to [ \f\n\r\t\v ].

\S

Matches any non- blank character. Equally in value to [ ^ \f\n\r\t\v ].

\t

Matches a scheduling symbol. Equally in value to \x09 and \I.

\v

Matches a vertical scheduling symbol. Equally in value to \x0b and \K.

\q

Quotation character string (\ "[ ^\" ] *\") | (\'''' [ ^\'''' ] *\'''')

\un

Matches n, n is uses four hexadecimal systems digital presentation the Unicode character. For example, \u00A9 match copyright mark (?) &#0;

\w

Match any word character which draws a line including under. Equally in value to ' [ A-Za-z0-9_ ] '.

\W

Matches any non- word character. Equally in value to ' [ ^A-Za-z0-9_ ] '

\xn

Matches n, n is the hexadecimal system &#0;&#0; value. The hexadecimal system &#0;&#0; value must be the definite two numbers word length. For example, '\x41' matches "A". '\x041' then equally in value to '\x04' & "1". The regular expression in the formula may use ASCII to code.

\z

An integer ([ 0-9 ] +)


Base de connaissances de Maxthon 2.0