I have alot of records in a text file. Most are contained on one line but some records are split into two lines. If the 4th char is "1", "2", or "3" then the record is ok. If the 4th char is something else (usually but not always a "~") then the whole line should be added to the end of the previous line. This is real easy to do manually (just backspace at the beginning of the offending line) but not practical with a doc containing 750K lines of text.
Just want to know if there's a way to edit this file using regex. A Before and After sample is given below. Thanks for your help.
Before
|||1|||...
|||3|||...
|||3|||...
|||~~||...
|||2|||...
|||1|||...
AAAA...
After
|||1|||...
|||3|||...
|||3|||...|||~~||...
|||2|||...
|||1|||...AAAA...
Combining lines of text
Moderators: AmigoJack, bbadmin, helios, MudGuard
-
ben_josephs
- Posts: 2464
- Joined: Sun Mar 02, 2003 9:22 pm