If you are talking about litteral ampersands, you need to type & so try <replaceregexp file="D:/CD/JMeterResults.xml" match="/&gt;&lt;" replace="/&gt; &lt;" /> <replaceregexp file="D:/CD/JMeterResults.xml" match="&gt;&lt;" replace="&gt; &lt;" />
----- Original Message ----- From: "Nagarajan Murugesan" <[EMAIL PROTECTED]> To: "Ant Users List" <[EMAIL PROTECTED]> Sent: Wednesday, August 27, 2003 2:59 PM Subject: RE: character replacement from a file content Jan, My ultimate aim is to introduce or insert a apace between the character />< and >< like "/> <" and "> <" I used <replaceregexp file="D:/CD/JMeterResults.xml" match="/><" replace="/> <" /> <replaceregexp file="D:/CD/JMeterResults.xml" match="><" replace="> <" /> still it is not replacing the string pattern. Thanks, Nagarajan -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 27, 2003 5:41 PM To: [EMAIL PROTECTED] Subject: RE: character replacement from a file content I think the < is replaces by < and that character isnīt in your file. Maybe match="\>\<" would work. Jan > -----Original Message----- > From: Nagarajan Murugesan [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 27, 2003 1:55 PM > To: Ant Users List > Subject: RE: character replacement from a file content > > > Hai, > > I have tried with regex also, it doen't work > > Here is the sample script: > > <replaceregexp file="D:/CD/Results.xml" match="/gt;<" > replace="/gt; <"/> > <replaceregexp file="D:/CD/Results.xml" match="gt;<" > replace="gt; > <"/> > > ie I want to add a space between /gt;< and gt;< in the > file containing > > following text. > > <?xml version="1.0" encoding="UTF-8"?> > <Response><Header><sessionId>8875285a07f7ga4 > 604268hhaa92c2 > 8699</sessionId><workflowresponse><uname>Mr. Admin > User</uname><userid>fsadmin</userid><part > yroleid>PR1 > 0001</partyroleid><firstname>Admin</firstname&g > t;<middlena > me > /><lastname>User</lastname><role>ADMINIST > RATOR</role > ></workflowresponse><action>create</action&g > t;<type> > sptest</type><sessionId>8875285a07f7ga4604268hhaa9 > 2c28699</se > ssionId><svrType>foundation > services</svrType><id>SP1111554</id></Hea > der><spt > est id="SP1111554" > source="SPDB"><objectid>SP1111554</objectid>< > ;IntegerPara > /><FloatPara /><StringPara /><DatePara > /><ProcedureResponse /></sptest></Response> > > can you help me to solve this?? > > Thanks, > Nagarajan M. > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 27, 2003 5:18 PM > To: [EMAIL PROTECTED] > Subject: RE: character replacement from a file content > > > Have you tried the <replace> task? > Or the <regex> filter? > > > Jan > > > -----Original Message----- > > From: Nagarajan Murugesan [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, August 27, 2003 1:28 PM > > To: Ant Users List > > Subject: character replacement from a file content > > > > > > > > Hai All, > > > > Is there any way to replace particular character or substring > > of a given file content with some value. > > > > For example a file read.txt contains > "greatoneisminelsafasmflsfaslfmlf > > lflsfldfmdlfldfldfloer" with out any space. > > 1. Can I replace all the 'l' character with value say 'jay' > > 2. Or can I replace each occurance of 're' with 'ki' > > something like that. > > > > I think pattern replacement will not support this!!! > > > > Is there any way to do that? Help me in that. > > > > Thanks, > > Nagarajan M. > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]