> I am trying to replace a \ with the character sequence 
> Don't ask why! Im not sure I know just yet.
>
> If I use this method:
>
> <replace file="${dir}\${file}"
> token="\" value="\" summary="true"> </replace>
>
> it just replaces \ with \
>
>
> If I use this method:
>
> <replaceregexp file="${dir}\${file}" match="\" replace="\"
> byline="true"/> I get this error:
> Unexpected internal error near index 1
>
> If I try to build up the sequence with multiple replaces, Ant won't let me
> insert an & into the file, I get this error:
> The entity name must immediately follow the '&' in the entity reference.
> Or
> "" is an invalid XML character.
>
> This is running ant on windows. Would the results be different from unix?
>
> Would sed work from unix? what is the best sed-like app for windows?
>
> Thanks
Can't use & directly in XML as it is a special char. Need to use the entity
ref so the parser does what you want.
This should work for you:
<replace file="test" token="\" value="&#x5c;" summary="true"/>
Hope this helps,
-raleigh
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]