Editplus 正则表达式

Editplus 正则表达式备忘笔记
Expression Description
 \t  Tab character.
 \n  New line.
 .  Matches any character.
 |

 Either expression on its left and right side matches the target string.

 eg, "a|b" matches "a" and "b".

 []

 Any of the enclosed characters may match the target character.

 eg, "[ab]" matches "a" and "b". "[0-9]" matches any digit.

 [^]

 None of the enclosed characters may match the target character.

 eg, "[^ab]" matches all character EXCEPT "a" and "b".

     "[^0-9]" matches any non-digit character.

 *

 Character to the left of asterisk in the expression should match 0 or more  times.

 eg,"be*" matches "b", "be" and "bee".

 +

 Character to the left of plus sign in the expression should match 1 or more times.

 eg,"be+" matches "be" and "bee" but not "b".

 ?

 Character to the left of question mark in the expression should match 0 or 1 time.

 eg,"be?" matches "b" and "be" but not "bee".

 ^

 Expression to the right of ^ matches only when it is at the beginning of line.

 eg,"^A" matches an "A" that is only at the beginning of line.

 $

 Expression to the left of $ matches only when it is at the end of line.

 eg,"e$" matches an "e" that is only at the end of line.

 ()  Affects evaluation order of expression and also used for tagged expression.
 \  Escape character. If you want to use character "\" itself, you should use "\\".
posted @ 2009-10-07 18:07  LeoLWang  阅读(247)  评论(0)    收藏  举报