不知到谁第一个将Regular Expression翻译为正则表达式,反正大家都这么称呼了。
快速入门看这几篇:
http://heishirt.blog.hexun.com/5134833_d.html#
http://www.regexlab.com/zh/regref.htm
http://www.zytrax.com/tech/web/regex.htm
在Classic Shell Scripting 这本书的Chapter 3 , Searching and Substitutions中有详细讲解。
要深究,就要阅读下面这本书,共345页,全部讲的是regular expression。
Mastering Regular Expressions
Powerful Techniques for Perl and Other Tools
Jeffrey E.F. Friedl
O'REILLY?
几个名词解释:
literalA literal is any character we use in a search or matching expression, for example, to find ind in windows the ind is a literal string - each character plays a part in the search, it is literally the string we want to find.metacharacterA metacharacter is one or more special characters that have a unique meaning and are NOT used asliterals in the search expression, for example, the character ^ (circumflex or caret) is a metacharacter.