Add CR/LF to Regex Replacement string

May 6, 2009 at 1:21 AM
Hi there, I'm adding elements to an xml file using the File.Replace task and I would like to format the output so that it matches the existing file layout, i.e. I need to add tabs and carriage returns. It's purely cosmetic and the replacement works without but it would be nice to get the aesthetics correct.

Thanks
Dave
Coordinator
May 6, 2009 at 3:55 PM
Hi Dave

Hopefully our upcoming xml tasks will mean you don't have to use the Replace task. In the mean time, what's stopping you from using special characters, e.g. \r\n
May 6, 2009 at 8:52 PM
Thanks Mike, actually I'm not sure xml tasks is likely to be of more use for the sort of quick fix I've applied in this case. With respect to your query, I tried putting a "\n" into the string but it just rendered it as the characters "\n". As I said, it is purely a cosmetic issue so I didn't want to spend a lot of time trying to figure out why it was occurring.
Coordinator
May 7, 2009 at 9:09 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Sep 14, 2009 at 9:16 PM

Dave, support for this has been added with the latest check-in.... Mike

Sep 14, 2009 at 9:37 PM
Awesome, thanks Mike.

Regards
Dave
 
On Tuesday, 15 September, 2009, at 08:17AM, "mikefourie" <notifications@codeplex.com> wrote:
>

From: mikefourie

Dave, support for this has been added with the latest check-in.... Mike