How to replace backslash with double backslash using regular expression?

Answered

Comments

2 comments

  • Avatar
    juanjo

    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.

  • Avatar
    HJM

    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.

Please sign in to leave a comment.