47346Re: Removing blank lines from a string
- Jan 31, 2004"Klaus Bosau" On: Saturday, January 31, 2004 8:54 PM
>[My previous solution for handling multiple blank lines at the
>Would this solve your problem?
> substitute(@a, '^\n\|\n\s*\n\@=', '', 'g')
beginning only handled up to two blank lines at the beginning]
I think the following is the solution:
substitute(@a, '^\(\s*\n\)*\|\n\s*\n\@=', '', 'g')
I have tested it with 0 or more blank lines at the beginning,
at the end and in between two non-trivial lines; blank lines
with and without white space; non-trivial lines starting and
ending with and without blank space.
- << Previous post in topic Next post in topic >>