Link to home
Start Free TrialLog in
Avatar of mrrmpc
mrrmpc

asked on

How would I delete the first 10 characters from a line using regex in Notepad++?

I have a bulk file that has multiple HL7 messages contained in the file.  Each message block starts with MSH segment.  However the batch file has index id numbers prepended to the string.  I need to remove the 10 characters before the 'MSH' and replace with blank.

I am using Notepad++ as the editor and I think this can be done possibly with regex but I don't know how to accomplish the task.  I have no regex experience, nor programming/scripting.

Thanks in advance for the assistance.

Current data example:
0000000764MSH|^~\&|RELAYHEALTH|RWJSL|RELAYHEALTH|RWJSL|20170622085225||ADT^A14|WIEH52WIJQQ7Q6JQVA7E|P|2.5
EVN|A14|20170622085225
...
0000000924MSH|^~\&|RELAYHEALTH|RWJSL|RELAYHEALTH|RWJSL|20170622091618||ADT^A14|TQSJB2CG9GTZH8SY8HWB|P|2.5
EVN|A14|20170622091618
...
0000000742MSH|^~\&|RELAYHEALTH|RWJSL|RELAYHEALTH|RWJSL|20170622091619||ADT^A14|EF0S0NGHIZLQGAYAMPT4|P|2.5
EVN|A14|20170622091619

Desired output would be:
MSH|^~\&|RELAYHEALTH|RWJSL|RELAYHEALTH|RWJSL|20170622085225||ADT^A14|WIEH52WIJQQ7Q6JQVA7E|P|2.5
EVN|A14|20170622085225
...
MSH|^~\&|RELAYHEALTH|RWJSL|RELAYHEALTH|RWJSL|20170622091618||ADT^A14|TQSJB2CG9GTZH8SY8HWB|P|2.5
EVN|A14|20170622091618
...
MSH|^~\&|RELAYHEALTH|RWJSL|RELAYHEALTH|RWJSL|20170622091619||ADT^A14|EF0S0NGHIZLQGAYAMPT4|P|2.5
EVN|A14|20170622091619
ASKER CERTIFIED SOLUTION
Avatar of NVIT
NVIT
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mrrmpc
mrrmpc

ASKER

Thanks for the quick turn around.  This did just what was needed!