grep tabulated table

To switch first and third columns of a tab-delimited table:

cell1 tab cell2 tab cell3 tab cell4 tab cell5 fin paragraphe
cell1 tab cell2 tab cell3 tab cell4 tab cell5 fin paragraphe

to get

cell3 tab cell1 tab cell2 tab cell4 tab cell5 fin paragraphe
cell3 tab cell1 tab cell2 tab cell4 tab cell5 fin paragraphe

use

Find:

((.*?\t){2})(.*?\t){1}(.*?\t){1}(.*?)\r

Replace:

\3\1\4\5\r

Ther, I’ll find it more rapidly next time.

  1. Laisser un commentaire

Répondre

Entrez vos coordonnées ci-dessous ou cliquez sur une icône pour vous connecter:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion / Changer )

Twitter picture

Vous commentez à l'aide de votre compte Twitter. Déconnexion / Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion / Changer )

Connexion à %s

Suivre

Get every new post delivered to your Inbox.

Joignez-vous à 372 followers