web stats
Mirth Community - View Single Post - Replacing a sequence of hex characters in preprocessor
View Single Post
  #2  
Old 12-06-2012, 05:41 AM
Bostad Bostad is offline
Level 85 Channel Wizard
 
Join Date: Mar 2009
Location: Stratford Ontario
Posts: 712
Bostad is an unknown quantity at this point
Default

Funny how immediately after I post I stumble across the solution.

I put this in my pre-processor

Code:
var pattern = RegExp(",(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)","g");



message = message.replace(pattern,'~');
Then I use ~ as a column delimiter.

Seems to work great!
__________________
I can be reached through gmail and Google Talk using davidrothbauer at gmail dot com
http://www.linkedin.com/pub/david-rothbauer/5/923/518
codeismydrug.wordpress.com
hl7coders.wordpress.com

Test all my code suggestions prior to implementation
Reply With Quote