"Norbert Nemec" <Norbert at Nemec-online.de> wrote in message news:i3lq17$99u$1 at digitalmars.com... >I usually do the same thing with a shell pipe > expand | sed 's/ *$//;s/\r$//;s/\r/\n/' > Filed under "Why I don't like regex for non-trivial things" ;)