Regular Expressions (Searching for patterns of text)
Character
Value
.
Wildcard: any character
搜尋任意字串(不含空字串或空白行)
*
Repeat: zero or more occurrences of previous character or class
^
Line position: beginning of line
找出每行開頭,符合指定的字串
$
Line position: end of line
找出每行結尾,符合指定的字串
[class]
Character class: any one character in set
找出符合[]內之字元資料。
[^class]
Inverse class: any one character not in set
相反於[class]的結果,就是不在集合內的內容才符合。
[X-y]
Range: any characters within the specified range
找出符合[]內之起迄字元資料 (符合之一即是)。[0-9][A-Za-z]。
\X
Escape: literal use of metacharacter X
這個功能尚未明瞭….。
\<xyz
Word position: beginning of word
找符合英文字開頭,例: \<wor 可找到hello world
xyz\>
Word position: end of word
找符合英文字結尾,例: \<lo 可找到hello world




