I have a directory path c:\test\dir and I need to change the single backshlash to double backslash c:\\test\\dir.

I have been trying to get this done with "setInstallerVariableFromRegEx" but I can't seem to find the right regular expression syntax.

How can I do this?

asked 26 Oct '12, 13:12

HJM's gravatar image

HJM
11446
accept rate: 0%


You could a regular expression:

 <setInstallerVariableFromRegEx>
    <name>path</name>
    <pattern>\\</pattern>
    <substitution>\\</substitution>
    <text>${path}</text>
 </setInstallerVariableFromRegEx>

Or simply use the .escape_backslashes suffix when using the path: ${path.escape_backslashes}. You can find additional information in this link.

link

answered 29 Oct '12, 05:32

juanjo's gravatar image

juanjo ♦♦
5.8k413
accept rate: 23%

Thanks. The regular expression doesen't seem to work but, the .escape_backslashes does the trick.

Also, thanks for the link to the full text user manual. It's much easier to search with everything on one page than the chapter per page version I was using.

link

answered 29 Oct '12, 08:57

HJM's gravatar image

HJM
11446
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×5
×1

Asked: 26 Oct '12, 13:12

Seen: 1,430 times

Last updated: 29 Oct '12, 08:57