Example: b.g matches big, beg, and bag, but not bp or baag. --> b.g
big beg bag bp baag
Example: ^Hello matches only if Hello appears at the beginning of a line --> ^Hello
Hello Hello
Example: TRUE$ matches only if TRUE appears at the very end of a line --> TRUE$
TRUE TRUE
Example: \tint abc; matches a tab character followed by int abc;. --> \tint abc
int abc
Example: \sif matches a space character followed by if --> \sif
if
Example: \wwhile matches either a tab or space character, followed by while. --> \wwhile
while
while
Example: a*b will match b, ab, aab, aaab, aaaab, and so on. --> a*b
b, ab, aab, aaab, aaaab,
Example: a+b will match ab, aab, aaab, aaaab, and so on, but not just b --> a+b
ab, aab, aaab, aaaab
Example: [abc] matches a, b, and c, but not d. --> [abc]
a, b, c, d
Example: [a-z] matches any character in the range a through z, but not A or 1 or 2 --> [a-z]
a b c d y z A 1 2
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余2页未读,立即下载