I want to do the following... insert '***END***' on the blank line above any line that starts with 'MSH|^~\'
before:
MSH|^~\&|CELLNETIX|PATHOLOGY|||
PV1|1||||||KOAD01^Koala^Diana^K
ORC|NW||P09-035258||||||2009050
OBR|1||P09-035258|GYN^PAP Smear
MSH|^~\&|CELLNETIX|PATHOLOGY|||
PV1|1||||||DANA01^Daniel^Anna^G
ORC|NW||P09-035259||||||2009050
OBR|1||P09-035259|GYN^PAP Smear
MSH|^~\&|CELLNETIX|PATHOLOGY|||
PV1|1||||||KOAD01^Koala^Diana^K
ORC|NW||P09-035258||||||2009050
OBR|1||P09-035258|GYN^PAP Smear
MSH|^~\&|CELLNETIX|PATHOLOGY|||
PV1|1||||||DANA01^Daniel^Anna^G
ORC|NW||P09-035259||||||2009050
OBR|1||P09-035259|GYN^PAP Smear
after:
***END***
MSH|^~\&|CELLNETIX|PATHOLOGY|||
PV1|1||||||KOAD01^Koala^Diana^K
ORC|NW||P09-035258||||||2009050
OBR|1||P09-035258|GYN^PAP Smear
***END***
MSH|^~\&|CELLNETIX|PATHOLOGY|||
PV1|1||||||DANA01^Daniel^Anna^G
ORC|NW||P09-035259||||||2009050
OBR|1||P09-035259|GYN^PAP Smear
***END***
MSH|^~\&|CELLNETIX|PATHOLOGY|||
PV1|1||||||KOAD01^Koala^Diana^K
ORC|NW||P09-035258||||||2009050
OBR|1||P09-035258|GYN^PAP Smear
***END***
MSH|^~\&|CELLNETIX|PATHOLOGY|||
PV1|1||||||DANA01^Daniel^Anna^G
ORC|NW||P09-035259||||||2009050
OBR|1||P09-035259|GYN^PAP Smear
Add phrase to blank line above certain lines...
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
Thanks for the great "before" and "after" examples, makes it much easier to understand your problem.
Here is an untested solution to try:
Search for: \n\n(MSH\|\^~\\)
Replace with: \n***END***\n\1
Use the following settings:
-----------------------------------------
[X] Regular expression
Replace All
-----------------------------------------
Configure | Preferences | Editor
[X] Use POSIX regular expression syntax
-----------------------------------------
Here is an untested solution to try:
Search for: \n\n(MSH\|\^~\\)
Replace with: \n***END***\n\1
Use the following settings:
-----------------------------------------
[X] Regular expression
Replace All
-----------------------------------------
Configure | Preferences | Editor
[X] Use POSIX regular expression syntax
-----------------------------------------
Hope this was helpful.............good luck,
Bob
Bob
Thank you..
I love this forum!