Page 1 of 1

Insert ascii 28 and carriage return linefeed

Posted: Mon Feb 11, 2008 7:17 am
by agent86
I have a text file and everytime I encounter "MSH|", I want to preceede it with an ascii 28 ( file seperator) and a carriage return/linefeed so I get the following results.

before:

OBX|135|FT|REPORT|135|
MSH|^~\&|CELLNETIX|PATHOLOGY|||200801121247||ORU^R01|

after:

OBX|135|FT|REPORT|135|

MSH|^~\&|CELLNETIX|PATHOLOGY|||200801121247||ORU^R01|


Thank you...

Posted: Mon Feb 11, 2008 8:37 am
by ben_josephs
Find what: MSH
Replace with: \x1C\nMSH

[X] Regular expression

Replace All
(Hexadecimal 1C = decimal 28.)

This assumes you are using Posix regular expression syntax:
Configure | Preferences | Editor

[X] Use POSIX regular expression syntax