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> 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM