ecplise 正则替换技巧

时间:2022-07-09 23:20:20

ctrl+f :

ecplise 正则替换技巧

ctrl+h:

ecplise 正则替换技巧

例:

替换

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

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

ecplise 正则替换技巧

附录:

ecplise 正则替换技巧

ecplise 正则替换技巧

ecplise 正则替换技巧

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

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