eclipse使用技巧---使用正则表达式查找替换

1,Eclipse ctrl+f 打开查找框
2,选中 Regular expressions (正则表达式)

去掉/* */(eclipse)        /\*(.|[\r\n])*?\*/
去掉//(eclipse)             //.*$
去掉import(eclipse)     import.*$
去掉空行(eclipse)         ^\s*\n
去掉空行(ue)               %[ ^t]++^p
 
 
把 <html.*property=/"([a-zA-Z/_]+)/".*/>
替换成 <c:out value=/"/$/{af.map.$1/}/" />
 
 
^hello 以hello为开头
hello$ 以hello为结尾
 
 
匹配以   </title> 结尾的字符串: 
.*? </title> 

匹配以   <title> 开头的字符串: 
<title> .* 

匹配以   <title> 开头 </title> 结尾的字符串: 
<title> .*? </title> 
posted @ 2016-07-13 21:51  Franson  阅读(8133)  评论(0编辑  收藏  举报