11297 line *&(*&_)(_)()_(_( line ends
line ba bla bla
line ba bla bla
11276 line *&(*&_)(_)()_(_( line ends
98764 line *&(*&_)(_)()_(_( line ends
line again some ba bla bla
I would like to merge all the lines to a single line that does not begin with the 5 numbers
11297 line *&(*&_)(_)()_(_( line ends line ba bla bla line ba bla bla
11276 line *&(*&_)(_)()_(_( line ends
98764 line *&(*&_)(_)()_(_( line ends line again some ba bla bla
I am able to get the first 5 number [0-9][0-9][0-9][0-9][0-9] but not sure how to merge lines when that does not appear ..
In TextPad this sort of thing can only be done with clunky methods, like this:
Use "Posix" regular expression syntax:
Configure | Preferences | Editor
[X] Use POSIX regular expression syntax
Search | Replace... (<F8>):
Find what: \n([^0-9]....|.[^0-9]...|..[^0-9]..|...[^0-9].|....[^0-9])
Replace with: _\1[Replace the underscore with a space]
[X] Regular expression
Replace All
This would be much simpler using a regex with negative look-ahead. But TextPad's regex recogniser doesn't support look-ahead. (WildEdit's recogniser (http://www.textpad.com/products/wildedit/), on the other hand, does.)