ecplise 正则替换技巧

 

ctrl+f :

 

ctrl+h:

 

 例:

 替换

(String)object1.getAttribute("X")
(String)object2.getAttribute("Y")
(String)objectN.getAttribute("Z")

getSafeStringAttribute(object1,"X")
getSafeStringAttribute(object2,"Y")
getSafeStringAttribute(objectN,"Z")

 

 

 

 

 

附录:

 

参考:https://www.cnblogs.com/shangdawei/p/4663134.html

http://www.runoob.com/java/java-regular-expressions.html

posted @ 2018-06-02 10:53  草木物语  阅读(203)  评论(0)    收藏  举报