14,953
edits
m (→快速查表) |
(→快速查表) |
||
| Line 7: | Line 7: | ||
說明: 藍色網底處代表符合規則的文字 | 說明: 藍色網底處代表符合規則的文字 | ||
<table border="1"> | <table border="1" style="width:100%"> | ||
<tr > | <tr > | ||
<th style="background-color: #E0E0E0;"> 文字規則 </th> | <th style="background-color: #E0E0E0;"> 文字規則 </th> | ||
<th style="background-color: #E0E0E0; width: | <th style="background-color: #E0E0E0; width:260px;"> sample </th> | ||
<th style="background-color: #9c9ca3;"> 對立的文字規則 </th> | <th style="background-color: #9c9ca3;"> 對立的文字規則 </th> | ||
<th style="background-color: #9c9ca3; width: | <th style="background-color: #9c9ca3; width:260px;"> sample</th> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
| Line 61: | Line 61: | ||
<td>不包含數字的任意次文字 <br /> {{kbd | key = <nowiki>[^\d]+</nowiki>}} </td> | <td>不包含數字的任意次文字 <br /> {{kbd | key = <nowiki>[^\d]+</nowiki>}} </td> | ||
<td><span style="background:#C6E3FF">What Does the Fox Say? </span>12 狐狸怎叫 34</td> | <td><span style="background:#C6E3FF">What Does the Fox Say? </span>12 狐狸怎叫 34</td> | ||
</tr> | |||
<tr> | |||
<td> 「狐狸」開頭的行 <br /> {{kbd | key = <nowiki>^狐狸.*$</nowiki>}}<ref>[http://www.regular-expressions.info/completelines.html Regex Examples: Matching Whole Lines of Text That Satisfy Certain Requirements]</ref></td> | |||
<td> | |||
<span style="background:#C6E3FF">狐狸怎叫 34 What Does the Fox Say?</span><br /> | |||
柴犬怎叫 What Does the shiba inu say? | |||
</td> | |||
<td>不以「狐狸」開頭的行 <br /> {{kbd | key = <nowiki>^(?!狐狸).*$</nowiki>}}<ref>[http://stackoverflow.com/questions/406230/regular-expression-to-match-text-that-doesnt-contain-a-word regex - Regular expression to match text that *doesn't* contain a word? - Stack Overflow]</ref> </td> | |||
<td> | |||
狐狸怎叫 34 What Does the Fox Say?<br /> | |||
<span style="background:#C6E3FF">柴犬怎叫 What Does the shiba inu say?</span> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td> 包含「狐狸」的行 <br /> {{kbd | key = <nowiki>^.*狐狸.*$</nowiki>}}</td> | |||
<td> | |||
<span style="background:#C6E3FF">What Does the Fox Say? 12 狐狸怎叫 34</span><br /> | |||
What Does the shiba inu say? 柴犬怎叫 | |||
</td> | |||
<td>不包「狐狸」的行 <br /> {{kbd | key = <nowiki>^((?!狐狸).)*$</nowiki>}} </td> | |||
<td> | |||
What Does the Fox Say? 12 狐狸怎叫 34<br /> | |||
<span style="background:#C6E3FF">What Does the shiba inu say? 柴犬怎叫 </span> | |||
</td> | |||
</tr> | </tr> | ||
</table> | </table> | ||