Last active
May 10, 2018 20:01
-
-
Save srbhbook/5f837eb356f72f103616803b12a74ab8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Mirth JS Split | |
var line; | |
var message = ''; | |
while (line = reader.readLine()) { | |
message += line + '\r\n'; // 1 to N | |
try { | |
reader.mark(1); //Looks ahead | |
var nextline = reader.readLine(); | |
if(nextline==null) break; | |
reader.reset(); | |
if (nextline.indexOf("TAG")==0) { | |
break; | |
} | |
} finally { | |
//reader.reset(); | |
} | |
} | |
return message; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment