14,953
edits
(→快速查表) |
(→快速查表) |
||
| Line 87: | Line 87: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> 布林邏輯 AND: 包含「狐狸」和「叫」的行 ([http://regexr.com/3aokl demo])<br /> {{kbd | key = <nowiki>(?=.*狐狸)(?=.*叫).*</nowiki>}}</td> | <td> 布林邏輯 AND: 包含「狐狸」和「叫」的行 ([http://regexr.com/3aokl demo])<ref>[http://stackoverflow.com/questions/469913/regular-expressions-is-there-an-and-operator regex - Regular Expressions: Is there an AND operator? - Stack Overflow]</ref><br /> {{kbd | key = <nowiki>(?=.*狐狸)(?=.*叫).*</nowiki>}}</td> | ||
<td> | <td> | ||
<span style="background:#C6E3FF">What Does the Fox Say? 12 狐狸怎叫 34</span><br /> | <span style="background:#C6E3FF">What Does the Fox Say? 12 狐狸怎叫 34</span><br /> | ||
| Line 105: | Line 105: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> 布林邏輯 NOT: 不包含「狐狸」,但包含「柴犬」的行 ([http://regexr.com/3aokr demo])<br /> {{kbd | key = <nowiki>^((?!狐狸).)*(柴犬).*$</nowiki>}} = {{kbd | key = <nowiki>^(柴犬).*((?!狐狸).)*$</nowiki>}} = {{kbd | key = <nowiki>(柴犬).*((?!狐狸).)*</nowiki>}} | <td> 布林邏輯 NOT: 不包含「狐狸」,但包含「柴犬」的行 ([http://regexr.com/3aokr demo])<ref>[http://stackoverflow.com/questions/2953039/regular-expression-for-a-string-containing-one-word-but-not-another regex - Regular expression for a string containing one word but not another - Stack Overflow]</ref><br /> {{kbd | key = <nowiki>^((?!狐狸).)*(柴犬).*$</nowiki>}} = {{kbd | key = <nowiki>^(柴犬).*((?!狐狸).)*$</nowiki>}} = {{kbd | key = <nowiki>(柴犬).*((?!狐狸).)*</nowiki>}}</td> | ||
<td> | <td> | ||
<span style="background:#C6E3FF">What Does the Fox Say? 12 狐狸怎叫 34</span><br /> | <span style="background:#C6E3FF">What Does the Fox Say? 12 狐狸怎叫 34</span><br /> | ||