ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Albert Sidelnik" <Sideln...@C-IV.org>
Subject Problem with regular expression and Ant 1.5.1
Date Wed, 19 Mar 2003 00:18:32 GMT
I've been stumped for a few days with a particular search/replace
expression that I'm using under Ant 1.5.1 which is
using Jakarta Oro for it's regex engine. Here are the details to my
problem:
 
The keyword that I'm searching for and trying to replace is the keyword
"class". I'm trying to replace it with the word "trainingClass"
as in the following example:
 
<civ:validateForm name="HomePageForm"
    method="post"
    action="utilities/Homepage/homepage"
    class="org.civ.architecture.validation.FormValidation"
    schema="/WEB-INF/Constraints.xsd"
    pageMbde="<%=PageMbde.EDIT%>">
 
the version I'd like to have would be the following:
<civ:validateForm name="HomePageForm"
    method="post"
    action="utilities/Homepage/homepage"
    trainingClass="org.civ.architecture.validation.FormValidation"
    schema="/WEB-INF/Constraints.xsd"
    pageMbde="<%=PageMbde.EDIT%>">
 
Here is the expression that I'm using:
(<civ[.|\s]*)class
 
Here is the exact ant syntax that I'm using:
<replaceregexp
    match="(&lt;civ[.|\s]*)class"
    replace="\1trainingClass"
    flags="mg"
    byLine="false">
    <fileset dir=...../>
 
Now to add more of a twist to this..there are more than one occurances
to the tags mentioned above that appear in my jsp's. So
they all would need to be evaluated for that particular expression.
Can somebody help me out. This is killing me. Thanks
-Albert
 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message