⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 patternmatch.html

📁 JK Proxy Project - Version 0.1 ------------------------------ This was going to be a proxy serve
💻 HTML
字号:
<html>
<head>
</head>
<body vlink="#0000FF" link="#0000FF">

<font size="2"  face="Verdana, Times New Roman">

<!-- back to navi start -->
<font size="-2">&lt;-- <a href="navi.html" target="jkp_navi">Navigation</a><br><br>
</font>
<!-- back to navi end -->


<font size="+1"><b>
Pattern matching
</b></font><br><br>
Several parts of this project use pattern matching (e.g. spam-filters and IP-rules). You probably know pattern matching from searching for files. For example when searching for files with the extension 'txt' you will search for '*.mpg'. This text string is a pattern and means "search for all files which begin with any sequence of characters and end with .mpg".<br><br>
I wrote my own small pattern matching module which only accepts three operators. These commands should be sufficient for all purposes in this project though:

<ul>
<li><b>*-operator</b>: stands for any number of characters (including zero).<br><br><i>Example:</i><br>
"he*lo" matches "hello", "hejlo" and "heelo" but also "helo" and "hellllllo"<br><br>
</li>
<li>
<b>?-operator</b>: represents any single character.<br><br><i>Example:</i><br>
"he?lo" matches "hello", "hejlo" and "heelo" but <u>NOT</u> "helo" and "hellllllo"<br><br>
</li>

<li>
<b>[{from}-{to}]-operator</b>: stands for a certain range of characters. This range is delimited by the {from} and {to}. All characters in between belong to this range. Valid ranges are "[0-9]", "[a-z]", "[A-Z]" etc.
<br><br><i>Example:</i><br>
"number[0-9]" matches "number0", "number6" and "number8" but not "numbers" and "number 8"<br><br>
</ul>

<b>Note:</b> As '[' is the beginning of an operator use '[[' in a pattern if you actually mean the character '['.

</font>

<!-- /end-tag replace-->
<!-- \end-tag replace-->

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -