web stats
Mirth Community - View Single Post - Replace '\E' from URL link using replace method
View Single Post
  #6  
Old 02-15-2019, 12:22 AM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 967
agermano is on a distinguished road
Default

Quote:
Originally Posted by odo View Post
You have to quote the backslash
You have to escape the backslash in the input string, too.
Code:
var str='\\E\\\\E\\10.1.2.154\\E\\bcs\\E\\30877_P9999_Adult{2}_02_05_2019_0329p.pdf';
var res=str.replace(/\\E\\/g, '\\');
logger.debug(res);

Last edited by agermano; 02-15-2019 at 05:45 AM.
Reply With Quote