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

📄 00000002.htm

📁 一份很好的linux入门资料
💻 HTM
📖 第 1 页 / 共 4 页
字号:
outer&nbsp;non-greedy&nbsp;quantifier&nbsp;overrides&nbsp;the&nbsp;inner&nbsp;greedy&nbsp;quantifiers&nbsp;and&nbsp;&nbsp;<BR>makes&nbsp;all&nbsp;quantifiers&nbsp;non-greedy!&nbsp;There's&nbsp;an&nbsp;explanation&nbsp;in&nbsp;re_syntax(n)&nbsp;<BR>&nbsp;reference&nbsp;page&nbsp;section&nbsp;named&nbsp;Matching.&nbsp;&nbsp;<BR>&nbsp;<BR>Character&nbsp;Classes&nbsp;<BR>A&nbsp;character&nbsp;class&nbsp;is&nbsp;a&nbsp;name&nbsp;for&nbsp;one&nbsp;or&nbsp;more&nbsp;characters.&nbsp;For&nbsp;example,&nbsp;&nbsp;<BR>punct&nbsp;stands&nbsp;for&nbsp;the&nbsp;&quot;punctuation&quot;&nbsp;characters.&nbsp;A&nbsp;character&nbsp;class&nbsp;is&nbsp;&nbsp;<BR>always&nbsp;written&nbsp;as&nbsp;part&nbsp;of&nbsp;a&nbsp;bracket&nbsp;expression,&nbsp;which&nbsp;is&nbsp;a&nbsp;list&nbsp;of&nbsp;&nbsp;<BR>characters&nbsp;enclosed&nbsp;in&nbsp;[].&nbsp;&nbsp;<BR>For&nbsp;instance,&nbsp;the&nbsp;character&nbsp;class&nbsp;named&nbsp;digit&nbsp;stands&nbsp;for&nbsp;any&nbsp;of&nbsp;the&nbsp;&nbsp;<BR>digits&nbsp;0-9&nbsp;(zero&nbsp;through&nbsp;nine).&nbsp;The&nbsp;character&nbsp;class&nbsp;is&nbsp;written&nbsp;with&nbsp;&nbsp;<BR>the&nbsp;class&nbsp;name&nbsp;inside&nbsp;a&nbsp;set&nbsp;of&nbsp;brackets&nbsp;and&nbsp;colons,&nbsp;like&nbsp;this:&nbsp;[[:&nbsp;<BR>digit:]].&nbsp;The&nbsp;old&nbsp;familiar&nbsp;expression&nbsp;for&nbsp;digits&nbsp;is&nbsp;written&nbsp;as&nbsp;a&nbsp;range:&nbsp;<BR>&nbsp;[0-9].&nbsp;When&nbsp;you&nbsp;compare&nbsp;the&nbsp;new&nbsp;character&nbsp;class&nbsp;to&nbsp;the&nbsp;old&nbsp;range&nbsp;&nbsp;<BR>version,&nbsp;you&nbsp;can&nbsp;see&nbsp;that&nbsp;the&nbsp;outer&nbsp;square&nbsp;brackets&nbsp;are&nbsp;the&nbsp;same&nbsp;in&nbsp;&nbsp;<BR>both.&nbsp;So&nbsp;a&nbsp;character&nbsp;class&nbsp;is&nbsp;written&nbsp;[:classname:].&nbsp;&nbsp;<BR>&nbsp;<BR>The&nbsp;table&nbsp;below&nbsp;describes&nbsp;the&nbsp;Tcl&nbsp;8.1&nbsp;character&nbsp;classes.&nbsp;alpha&nbsp;A&nbsp;&nbsp;<BR>letter&nbsp;(includes&nbsp;many&nbsp;non-ASCII&nbsp;characters).&nbsp;&nbsp;<BR>upper&nbsp;An&nbsp;upper-case&nbsp;letter.&nbsp;&nbsp;<BR>lower&nbsp;A&nbsp;lower-case&nbsp;letter.&nbsp;&nbsp;<BR>digit&nbsp;A&nbsp;decimal&nbsp;digit.&nbsp;&nbsp;<BR>xdigit&nbsp;A&nbsp;hexadecimal&nbsp;digit.&nbsp;&nbsp;<BR>alnum&nbsp;An&nbsp;alphanumeric&nbsp;(letter&nbsp;or&nbsp;digit).&nbsp;&nbsp;<BR>print&nbsp;An&nbsp;alphanumeric.&nbsp;(Same&nbsp;as&nbsp;alnum.)&nbsp;&nbsp;<BR>blank&nbsp;A&nbsp;space&nbsp;or&nbsp;tab&nbsp;character.&nbsp;&nbsp;<BR>space&nbsp;A&nbsp;character&nbsp;producing&nbsp;white&nbsp;space&nbsp;in&nbsp;displayed&nbsp;text.&nbsp;(Includes&nbsp;&nbsp;<BR>en-space,&nbsp;hair&nbsp;space,&nbsp;many&nbsp;others.)&nbsp;&nbsp;<BR>punct&nbsp;A&nbsp;punctuation&nbsp;character.&nbsp;&nbsp;<BR>graph&nbsp;A&nbsp;character&nbsp;with&nbsp;a&nbsp;visible&nbsp;representation.&nbsp;&nbsp;<BR>cntrl&nbsp;A&nbsp;control&nbsp;character.&nbsp;&nbsp;<BR>&nbsp;<BR>&nbsp;<BR>You&nbsp;can&nbsp;use&nbsp;more&nbsp;than&nbsp;one&nbsp;character&nbsp;class&nbsp;in&nbsp;a&nbsp;bracket&nbsp;expression.&nbsp;You&nbsp;&nbsp;<BR>can&nbsp;also&nbsp;mix&nbsp;character&nbsp;classes&nbsp;with&nbsp;ranges&nbsp;and&nbsp;single&nbsp;characters.&nbsp;For&nbsp;&nbsp;<BR>instance,&nbsp;[[:digit:]a-cx-z]&nbsp;would&nbsp;match&nbsp;a&nbsp;digit&nbsp;(0-9),&nbsp;a,&nbsp;b,&nbsp;c,&nbsp;x,&nbsp;y,&nbsp;or&nbsp;<BR>&nbsp;z&nbsp;--&nbsp;and&nbsp;[^[:digit:]a-cx-z]&nbsp;would&nbsp;match&nbsp;any&nbsp;character&nbsp;except&nbsp;those.&nbsp;&nbsp;<BR>This&nbsp;syntax&nbsp;can&nbsp;take&nbsp;some&nbsp;time&nbsp;to&nbsp;get&nbsp;familiar&nbsp;with!&nbsp;The&nbsp;key&nbsp;is&nbsp;to&nbsp;&nbsp;<BR>look&nbsp;for&nbsp;the&nbsp;character&nbsp;class&nbsp;(here,&nbsp;[:digit:])&nbsp;inside&nbsp;the&nbsp;bracket&nbsp;&nbsp;<BR>expression.&nbsp;&nbsp;<BR>&nbsp;<BR>The&nbsp;advantage&nbsp;of&nbsp;character&nbsp;classes&nbsp;(like&nbsp;[:alpha:])&nbsp;over&nbsp;explicit&nbsp;ranges&nbsp;<BR>&nbsp;in&nbsp;brackets&nbsp;(like&nbsp;[a-z])&nbsp;is&nbsp;that&nbsp;character&nbsp;classes&nbsp;include&nbsp;characters&nbsp;&nbsp;<BR>that&nbsp;aren't&nbsp;easy&nbsp;to&nbsp;type&nbsp;on&nbsp;ASCII&nbsp;keyboards.&nbsp;For&nbsp;example,&nbsp;the&nbsp;Spanish&nbsp;&nbsp;<BR>language&nbsp;includes&nbsp;the&nbsp;character&nbsp;?.&nbsp;It&nbsp;doesn't&nbsp;fall&nbsp;into&nbsp;the&nbsp;range&nbsp;[a-z],&nbsp;<BR>&nbsp;but&nbsp;it&nbsp;is&nbsp;in&nbsp;the&nbsp;Tcl&nbsp;8.1&nbsp;character&nbsp;class&nbsp;[:alpha:].&nbsp;In&nbsp;the&nbsp;same&nbsp;way,&nbsp;&nbsp;<BR>the&nbsp;Spanish&nbsp;punctuation&nbsp;character&nbsp;?&nbsp;isn't&nbsp;in&nbsp;a&nbsp;list&nbsp;of&nbsp;punctuation&nbsp;&nbsp;<BR>characters&nbsp;like&nbsp;[.!?,],&nbsp;but&nbsp;it&nbsp;is&nbsp;part&nbsp;of&nbsp;[:punct:].&nbsp;&nbsp;<BR>&nbsp;<BR>Tcl&nbsp;8.1&nbsp;has&nbsp;a&nbsp;standard&nbsp;set&nbsp;of&nbsp;character&nbsp;classes&nbsp;that&nbsp;are&nbsp;defined&nbsp;in&nbsp;&nbsp;<BR>the&nbsp;source&nbsp;code&nbsp;file&nbsp;generic/regc_locale.c.&nbsp;Tcl&nbsp;8.1&nbsp;has&nbsp;one&nbsp;locale&nbsp;&nbsp;<BR>defined:&nbsp;the&nbsp;Unicode&nbsp;locale.&nbsp;It&nbsp;may&nbsp;support&nbsp;other&nbsp;locales&nbsp;(and&nbsp;other&nbsp;&nbsp;<BR>character&nbsp;classes)&nbsp;in&nbsp;the&nbsp;future.&nbsp;&nbsp;<BR>&nbsp;<BR>Collating&nbsp;Elements&nbsp;<BR>A&nbsp;collating&nbsp;symbol&nbsp;lets&nbsp;you&nbsp;represent&nbsp;other&nbsp;characters&nbsp;unambiguously.&nbsp;&nbsp;<BR>A&nbsp;collating&nbsp;symbol&nbsp;is&nbsp;written&nbsp;surrounded&nbsp;by&nbsp;brackets&nbsp;and&nbsp;dots,&nbsp;like&nbsp;[.&nbsp;<BR>number-sign.]&nbsp;Collating&nbsp;symbols&nbsp;must&nbsp;be&nbsp;written&nbsp;in&nbsp;a&nbsp;bracket&nbsp;&nbsp;<BR>expression&nbsp;(inside&nbsp;[]).&nbsp;So&nbsp;[[.number-sign.]]&nbsp;will&nbsp;match&nbsp;the&nbsp;character&nbsp;#,&nbsp;<BR>&nbsp;as&nbsp;you&nbsp;can&nbsp;see&nbsp;here:&nbsp;&nbsp;<BR>&nbsp;<BR>%&nbsp;regexp&nbsp;{[[.number-sign.]]+}&nbsp;{123###456}&nbsp;match&nbsp;<BR>1&nbsp;<BR>%&nbsp;set&nbsp;match&nbsp;<BR>###&nbsp;<BR>&nbsp;<BR>Tcl&nbsp;8.1&nbsp;has&nbsp;a&nbsp;standard&nbsp;set&nbsp;of&nbsp;collating&nbsp;symbols&nbsp;that&nbsp;are&nbsp;defined&nbsp;in&nbsp;&nbsp;<BR>the&nbsp;source&nbsp;code&nbsp;file&nbsp;generic/regc_locale.c.&nbsp;Note:&nbsp;Tcl&nbsp;8.1&nbsp;does&nbsp;not&nbsp;&nbsp;<BR>implement&nbsp;multi-character&nbsp;collating&nbsp;elements&nbsp;like&nbsp;ch&nbsp;(which&nbsp;is&nbsp;the&nbsp;&nbsp;<BR>fourth&nbsp;character&nbsp;in&nbsp;the&nbsp;Spanish&nbsp;alphabet&nbsp;a,&nbsp;b,&nbsp;c,&nbsp;ch,&nbsp;d,&nbsp;e,&nbsp;f,&nbsp;g,&nbsp;h,&nbsp;i.&nbsp;<BR>..)&nbsp;So&nbsp;the&nbsp;examples&nbsp;below&nbsp;are&nbsp;not&nbsp;supported&nbsp;in&nbsp;Tcl&nbsp;8.1,&nbsp;but&nbsp;are&nbsp;here&nbsp;for&nbsp;<BR>&nbsp;completeness.&nbsp;(Future&nbsp;versions&nbsp;of&nbsp;Tcl&nbsp;may&nbsp;have&nbsp;multi-character&nbsp;&nbsp;<BR>collating&nbsp;elements.)&nbsp;&nbsp;<BR>Suppose&nbsp;ch&nbsp;and&nbsp;c&nbsp;sort&nbsp;next&nbsp;to&nbsp;each&nbsp;other&nbsp;in&nbsp;your&nbsp;dialect,&nbsp;and&nbsp;ch&nbsp;is&nbsp;&nbsp;<BR>treated&nbsp;as&nbsp;an&nbsp;atomic&nbsp;character.&nbsp;The&nbsp;example&nbsp;bracket&nbsp;expression&nbsp;below&nbsp;&nbsp;<BR>uses&nbsp;two&nbsp;collating&nbsp;symbols.&nbsp;It&nbsp;matches&nbsp;one&nbsp;or&nbsp;more&nbsp;of&nbsp;ch&nbsp;and&nbsp;c.&nbsp;But&nbsp;it&nbsp;&nbsp;<BR>doesn't&nbsp;match&nbsp;an&nbsp;h&nbsp;standing&nbsp;alone:&nbsp;&nbsp;<BR>&nbsp;<BR>&nbsp;<BR>%&nbsp;set&nbsp;input&nbsp;&quot;cchchh&quot;&nbsp;<BR>cchchh&nbsp;<BR>%&nbsp;regexp&nbsp;{[[.ch.][.c.]]+}&nbsp;$input&nbsp;match;&nbsp;set&nbsp;match&nbsp;<BR>cchch&nbsp;<BR>&nbsp;<BR>Here's&nbsp;one&nbsp;tricky&nbsp;and&nbsp;surprising&nbsp;thing&nbsp;about&nbsp;collating&nbsp;symbols.&nbsp;A&nbsp;&nbsp;<BR>caret&nbsp;at&nbsp;the&nbsp;start&nbsp;of&nbsp;a&nbsp;bracket&nbsp;expression&nbsp;([^...)&nbsp;means&nbsp;that,&nbsp;in&nbsp;a&nbsp;&nbsp;<BR>locale&nbsp;with&nbsp;multi-character&nbsp;collating&nbsp;elements,&nbsp;the&nbsp;symbol&nbsp;can&nbsp;match&nbsp;&nbsp;<BR>more&nbsp;than&nbsp;one&nbsp;character.&nbsp;For&nbsp;instance,&nbsp;the&nbsp;RE&nbsp;in&nbsp;the&nbsp;example&nbsp;below&nbsp;&nbsp;<BR>matches&nbsp;any&nbsp;character&nbsp;other&nbsp;than&nbsp;c,&nbsp;followed&nbsp;by&nbsp;the&nbsp;character&nbsp;b.&nbsp;So&nbsp;&nbsp;<BR>the&nbsp;expression&nbsp;matches&nbsp;all&nbsp;of&nbsp;chb:&nbsp;&nbsp;<BR>&nbsp;<BR>%&nbsp;set&nbsp;input&nbsp;chb&nbsp;<BR>%&nbsp;regexp&nbsp;{[^[.c.]]b}&nbsp;$input&nbsp;match;&nbsp;set&nbsp;match&nbsp;<BR>chb&nbsp;<BR>&nbsp;<BR>Again,&nbsp;the&nbsp;two&nbsp;previous&nbsp;examples&nbsp;are&nbsp;not&nbsp;supported&nbsp;in&nbsp;Tcl&nbsp;8.1,&nbsp;but&nbsp;are&nbsp;&nbsp;<BR>here&nbsp;for&nbsp;completeness.&nbsp;&nbsp;<BR>Equivalence&nbsp;Classes&nbsp;<BR>An&nbsp;equivalence&nbsp;class&nbsp;is&nbsp;written&nbsp;as&nbsp;part&nbsp;of&nbsp;a&nbsp;bracket&nbsp;expression,&nbsp;like&nbsp;&nbsp;<BR>[[=c=]].&nbsp;It's&nbsp;any&nbsp;collating&nbsp;element&nbsp;that&nbsp;has&nbsp;the&nbsp;same&nbsp;relative&nbsp;order&nbsp;&nbsp;<BR>in&nbsp;the&nbsp;collating&nbsp;sequence&nbsp;as&nbsp;c.&nbsp;&nbsp;<BR>Note:&nbsp;Tcl&nbsp;8.1&nbsp;only&nbsp;implements&nbsp;the&nbsp;Unicode&nbsp;locale.&nbsp;It&nbsp;doesn't&nbsp;define&nbsp;&nbsp;<BR>any&nbsp;equivalence&nbsp;classes.&nbsp;So,&nbsp;although&nbsp;the&nbsp;Tcl&nbsp;regular&nbsp;expression&nbsp;&nbsp;<BR>engine&nbsp;supports&nbsp;equivalence&nbsp;classes,&nbsp;the&nbsp;examples&nbsp;below&nbsp;are&nbsp;not&nbsp;&nbsp;<BR>supported&nbsp;in&nbsp;Tcl&nbsp;8.1.&nbsp;(Future&nbsp;versions&nbsp;of&nbsp;Tcl&nbsp;may&nbsp;define&nbsp;equivalence&nbsp;&nbsp;<BR>classes.)&nbsp;&nbsp;<BR>&nbsp;<BR>Let's&nbsp;imagine&nbsp;that&nbsp;both&nbsp;of&nbsp;the&nbsp;characters&nbsp;A&nbsp;and&nbsp;a&nbsp;fall&nbsp;at&nbsp;the&nbsp;same&nbsp;place&nbsp;<BR>&nbsp;in&nbsp;the&nbsp;collating&nbsp;sequence;&nbsp;they&nbsp;belong&nbsp;to&nbsp;the&nbsp;same&nbsp;equivalence&nbsp;class.&nbsp;&nbsp;<BR>In&nbsp;that&nbsp;case,&nbsp;both&nbsp;of&nbsp;the&nbsp;bracket&nbsp;expressions&nbsp;[[=A=]b]&nbsp;and&nbsp;[[=a=]b]&nbsp;&nbsp;<BR>are&nbsp;equivalent&nbsp;to&nbsp;writing&nbsp;[Aab].&nbsp;As&nbsp;another&nbsp;example,&nbsp;if&nbsp;o&nbsp;and&nbsp;?&nbsp;are&nbsp;&nbsp;<BR>members&nbsp;of&nbsp;an&nbsp;equivalence&nbsp;class,&nbsp;then&nbsp;all&nbsp;of&nbsp;the&nbsp;bracket&nbsp;expressions&nbsp;&nbsp;<BR>[[=o=]],&nbsp;[[=?=]],&nbsp;and&nbsp;[o?]&nbsp;match&nbsp;those&nbsp;same&nbsp;two&nbsp;characters.&nbsp;&nbsp;<BR>&nbsp;<BR>Noncapturing&nbsp;Subpatterns&nbsp;<BR>There&nbsp;are&nbsp;two&nbsp;reasons&nbsp;to&nbsp;put&nbsp;parentheses&nbsp;around&nbsp;all&nbsp;or&nbsp;part&nbsp;of&nbsp;an&nbsp;RE.&nbsp;&nbsp;<BR>One&nbsp;is&nbsp;to&nbsp;make&nbsp;a&nbsp;quantifier&nbsp;(like&nbsp;*&nbsp;or&nbsp;+)&nbsp;apply&nbsp;to&nbsp;the&nbsp;parenthesized&nbsp;&nbsp;<BR>part.&nbsp;For&nbsp;instance,&nbsp;the&nbsp;RE&nbsp;Oh,(&nbsp;no!)+&nbsp;would&nbsp;match&nbsp;Oh,&nbsp;no!&nbsp;as&nbsp;well&nbsp;as&nbsp;Oh,&nbsp;<BR>&nbsp;no!&nbsp;no!&nbsp;and&nbsp;so&nbsp;on.&nbsp;The&nbsp;other&nbsp;reason&nbsp;to&nbsp;use&nbsp;parentheses&nbsp;is&nbsp;that&nbsp;they&nbsp;&nbsp;<BR>capture&nbsp;the&nbsp;matched&nbsp;text.&nbsp;Captured&nbsp;text&nbsp;is&nbsp;used&nbsp;in&nbsp;back&nbsp;references,&nbsp;in&nbsp;&nbsp;<BR>&quot;matching&quot;&nbsp;variables&nbsp;in&nbsp;the&nbsp;regexp&nbsp;command,&nbsp;as&nbsp;well&nbsp;as&nbsp;in&nbsp;the&nbsp;regsub&nbsp;&nbsp;<BR>command.&nbsp;&nbsp;<BR>If&nbsp;you&nbsp;don't&nbsp;want&nbsp;parentheses&nbsp;to&nbsp;capture&nbsp;text,&nbsp;add&nbsp;?:&nbsp;after&nbsp;the&nbsp;&nbsp;<BR>opening&nbsp;parenthesis.&nbsp;For&nbsp;instance,&nbsp;in&nbsp;the&nbsp;example&nbsp;below,&nbsp;the&nbsp;&nbsp;<BR>subexpression&nbsp;(?:http|ftp)&nbsp;matches&nbsp;either&nbsp;http&nbsp;or&nbsp;ftp&nbsp;but&nbsp;doesn't&nbsp;&nbsp;<BR>capture&nbsp;it.&nbsp;So&nbsp;the&nbsp;back&nbsp;reference&nbsp;\1&nbsp;will&nbsp;hold&nbsp;the&nbsp;end&nbsp;of&nbsp;the&nbsp;URL&nbsp;&nbsp;<BR>(from&nbsp;the&nbsp;second&nbsp;set&nbsp;of&nbsp;parentheses):&nbsp;&nbsp;<BR>&nbsp;<BR>&nbsp;<BR>%&nbsp;set&nbsp;x&nbsp;<A HREF="http://www.ajubasolutions.com">http://www.ajubasolutions.com</A>&nbsp;<BR><A HREF="http://www.ajubasolutions.com">http://www.ajubasolutions.com</A>&nbsp;<BR>%&nbsp;regsub&nbsp;{(?:http|ftp)://(.*)}&nbsp;$x&nbsp;{The&nbsp;hostname&nbsp;is&nbsp;\1}&nbsp;answer&nbsp;<BR>1&nbsp;<BR>%&nbsp;set&nbsp;answer&nbsp;<BR>The&nbsp;hostname&nbsp;is&nbsp;www.ajubasolutions.com&nbsp;<BR>&nbsp;<BR>Lookahead&nbsp;Assertions&nbsp;<BR>There&nbsp;are&nbsp;times&nbsp;you'd&nbsp;like&nbsp;to&nbsp;be&nbsp;able&nbsp;to&nbsp;test&nbsp;for&nbsp;a&nbsp;pattern&nbsp;without&nbsp;&nbsp;<BR>including&nbsp;that&nbsp;text&nbsp;in&nbsp;the&nbsp;match.&nbsp;For&nbsp;instance,&nbsp;you&nbsp;might&nbsp;want&nbsp;to&nbsp;&nbsp;<BR>match&nbsp;the&nbsp;protocol&nbsp;in&nbsp;a&nbsp;URL&nbsp;(like&nbsp;http&nbsp;or&nbsp;ftp),&nbsp;but&nbsp;only&nbsp;if&nbsp;that&nbsp;URL&nbsp;&nbsp;<BR>ends&nbsp;with&nbsp;.com.&nbsp;Or&nbsp;maybe&nbsp;you&nbsp;want&nbsp;to&nbsp;match&nbsp;the&nbsp;protocol&nbsp;only&nbsp;if&nbsp;the&nbsp;&nbsp;<BR>URL&nbsp;does&nbsp;not&nbsp;end&nbsp;with&nbsp;.edu.&nbsp;In&nbsp;cases&nbsp;like&nbsp;those,&nbsp;you'd&nbsp;like&nbsp;to&nbsp;&quot;look&nbsp;&nbsp;<BR>ahead&quot;&nbsp;and&nbsp;see&nbsp;how&nbsp;the&nbsp;URL&nbsp;ends.&nbsp;A&nbsp;lookahead&nbsp;assertion&nbsp;is&nbsp;handy&nbsp;here.&nbsp;&nbsp;<BR>A&nbsp;positive&nbsp;lookahead&nbsp;has&nbsp;the&nbsp;form&nbsp;(?=re).&nbsp;It&nbsp;matches&nbsp;at&nbsp;any&nbsp;place&nbsp;&nbsp;<BR>ahead&nbsp;where&nbsp;there's&nbsp;a&nbsp;substring&nbsp;like&nbsp;re.&nbsp;A&nbsp;negative&nbsp;lookahead&nbsp;has&nbsp;the&nbsp;&nbsp;<BR>form&nbsp;(?!re).&nbsp;It&nbsp;matches&nbsp;at&nbsp;any&nbsp;point&nbsp;where&nbsp;the&nbsp;regular&nbsp;expression&nbsp;re&nbsp;&nbsp;<BR>does&nbsp;not&nbsp;match.&nbsp;Let's&nbsp;see&nbsp;some&nbsp;examples:&nbsp;&nbsp;<BR>&nbsp;<BR>&nbsp;<BR>%&nbsp;set&nbsp;x&nbsp;<A HREF="http://www.ajubasolutions.com">http://www.ajubasolutions.com</A>&nbsp;<BR><A HREF="http://www.ajubasolutions.com">http://www.ajubasolutions.com</A>&nbsp;<BR>%&nbsp;regexp&nbsp;{^[^:]+(?=.*\.com$)}&nbsp;$x&nbsp;match&nbsp;<BR>

⌨️ 快捷键说明

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