Chinaunix首页 | 论坛 | 博客
  • 博客访问: 182450
  • 博文数量: 42
  • 博客积分: 2235
  • 博客等级: 大尉
  • 技术积分: 460
  • 用 户 组: 普通用户
  • 注册时间: 2009-11-15 20:17
文章分类

全部博文(42)

文章存档

2012年(1)

2011年(7)

2010年(33)

2009年(1)

我的朋友

分类:

2010-02-28 22:10:35

{^[yY]}
 Begins with y or Y, as in a Yes answer.
 
{^(yes|YES|Yes)$}
 Exactly "yes", "Yes", or "YES".
 
{^[^ \t:\]+:}
 Begins with colon-delimited field that has no spaces or tabs.
 
{^\S+?:}
 Same as above, using \S for "not space".
 
"^\[ \t]*$"
 A string of all spaces or tabs.
 
{(?n)^\s*$}
 A blank line using newline sensitive mode.
 
"(\n|^)\[^\n\]*(\n|$)"
 A blank line, the hard way.
 
{^[A-Za-z]+$}
 Only letters.
 
{^[[:alpha:]]+$}
 Only letters, the Unicode way.
 
{[A-Za-z0-9_]+}
 Letters, digits, and the underscore.
 
{\w+}
 Letters, digits, and the underscore using \w.
 
{[][${}\\]}
 The set of Tcl special characters: ] [ $ { } \
 
"\[^\n\]*\n"
 Everything up to a newline.
 
{.*?\n}
 Everything up to a newline using nongreedy *?
 
{\.}
 A period.
 
{[][$^?+*()|\\]}
 The set of regular expression special characters:

] [ $ ^ ? + * ( ) | \
 

(.*?)


 An H1 HTML tag. The subpattern matches the string between the tags.
 

 HTML comments.
 
{[0-9a-hA-H][0-9a-hA-H]}
 2 hex digits.
 
{[[:xdigit:]]{2}}
 2 hex digits, using advanced regular expressions.
 
{\d{1,3}}
 1 to 3 digits, using advanced regular expressions.
阅读(813) | 评论(0) | 转发(0) |
0

上一篇:regsub命令

下一篇:名字空间(namespace)

给主人留下些什么吧!~~