Search by column
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
Search by column
Textpad appears to search by row (i.e., horizontally).
Is there any way to search by column (i.e., vertically)?
Is there any way to search by column (i.e., vertically)?
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
Do you mean you want it to find the matches of your search expression in a different order, so that, for example, it finds matches for the regex \d in numerical order in the text
?
No, it can't do that.
Code: Select all
xxx 1 xxx 5 xxx
xxx 2 xxx 6 xxx
xxx 3 xxx 7 xxx
xxx 4 xxx 8 xxx
No, it can't do that.
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
You could use block mode (Configure > Block Select Mode), then select your "column" and search on selection only. (Edit: no, you can't)
After all, text files never have columns - thus don't expect a text editor to know your definition of where a column ends and the next begins.
After all, text files never have columns - thus don't expect a text editor to know your definition of where a column ends and the next begins.
Last edited by AmigoJack on Mon Oct 31, 2016 10:23 pm, edited 1 time in total.
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
My bad: you really can't search on selection. After all those years I always thought it was there as option, yet I never needed it. (But it wouldn't be senseless either.)
I can't even start to think about treating text as columns: the search goes thru text in a stream. Seeking column-wise (we still don't know by what columns are separated... tabs? spaces?) would mean to let the search make multiple jumps in the text stream. Which is technically possible, but questionably worth the cost of work it needs.
I can't even start to think about treating text as columns: the search goes thru text in a stream. Seeking column-wise (we still don't know by what columns are separated... tabs? spaces?) would mean to let the search make multiple jumps in the text stream. Which is technically possible, but questionably worth the cost of work it needs.