examples.html

来自「nedit 是一款linux下的开发源码的功能强大的编辑器」· HTML 代码 · 共 87 行

HTML
87
字号
<HTML><HEAD><TITLE> Regular Expressions </TITLE></HEAD><BODY><A NAME="Example_Regular_Expressions"></A><H2> Example Regular Expressions </H2><P>The following are regular expression examples which will match:</P><P><UL>    <li>An entire line.</li></UL><PRE>        ^.*$</PRE></P><P><UL>    <li>Blank lines.</li></UL><PRE>        ^$</PRE></P><P><UL>    <li>Whitespace on a line.</li></UL><PRE>        \s+</PRE></P><P><UL>    <li>Whitespace across lines.</li></UL><PRE>        (?n\s+)</PRE></P><P><UL>    <li>Whitespace that spans at least two lines. Note minimal matching `*?' quantifier.</li></UL><PRE>        (?n\s*?\n\s*)</PRE></P><P><UL>    <li>IP address (not robust).</li></UL><PRE>        (?:\d{1,3}(?:\.\d{1,3}){3})</PRE></P><P><UL>    <li>Two character US Postal state abbreviations (includes territories).</li></UL><PRE>        [ACDF-IK-PR-W][A-Z]</PRE></P><P><UL>    <li>Web addresses.</li></UL><PRE>        (?:http://)?www\.\S+</PRE></P><P><UL>    <li>Case insensitive double words across line breaks.</li></UL><PRE>        (?i(?n&#60;(\S+)\s+\1&#62;))</PRE></P><P><UL>    <li>Upper case words with possible punctuation.</li></UL><PRE>        &#60;[A-Z][^a-z\s]*&#62;</PRE></P><P><P><HR></P><P></P><P></P></BODY></HTML>

⌨️ 快捷键说明

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