0
我有一個JSF標籤:想用正則表達式替換標籤中的值屬性?
<h:graphicImage styleClass="iconButton" id="expandImage" onclick="toggleFilter();" onmouseout="onMouseOutExpandButton();" onmouseover="onHoverExpandButton();" value = "./resources/images/allFilter_idle.gif" style="cursor:pointer; margin-top : 6px; margin-bottom: 6px; margin-right: 3px;"> </h:graphicImage>
我想替換屬性value
的價值,改變屬性名稱styleClass
到「類」?是否可以通過regex
。
任何幫助,將不勝感激。
P.S.我是正則表達式的noob,所以無法自己弄清楚。
編輯:
我做它在Eclipse中。
你爲什麼要使用正則表達式,而不是DOM?你是否試圖在你的IDE中使用find-and-replace來做到這一點? – 2012-07-19 12:45:31
是的,這是可能的,但你爲什麼要?什麼語言?什麼環境?目的是什麼? – 2012-07-19 12:45:51
@MattBall:是的,我在Eclipse中做。 – HashimR 2012-07-19 12:46:37