A solution without regular expressions
There are many ways for selecting columns in a delimited text. The easiest ones require GNU awk, cut and Perl. Let's consider the following file:
|
1
2
3
4
|
[johndoe@ArchLinux]% cat
|