user2776193
user2776193

Reputation: 103

Selecting column by separator in text editor

How I can select a column separated by a delimiter using a text editor( like notepad++ , sublime etc etc).

For example this is my text:

1053-57-1-5435345-423
3-4-2-6-2
3433434-3-5-2-5

and let's say I want to select the 4th column

5435345
6
2

I know that notepad++ or sublime are used for complex operations so I thought that's it could be possible to do that.

note: as you can see , selecting column by the drag method won't work because the length of each row is not constant.

Thanks

Upvotes: 0

Views: 3203

Answers (1)

Toto
Toto

Reputation: 91415

With notepad++

Use replace with regex:

Type Ctrl-H

Find what: ^(?:[^-]+-){3}([^-]+).*$
Replace with: $1

Make sure that Regular expression is checked.
Click on Replace All.

Upvotes: 1

Related Questions