My text file has 1 million lines each 1,274 characters long.
How can I find the line having the number 9 in the rightmost byte?
For example, how do I find the line in red?
0000000000000000000009999900000
0000000099999000000000000000000
9999000000000000000000000000000
0000000000000000000000000999900
0000000000000099999990000000000
0000000000000000000000000000000
0000000000000000099999900000000
Find right-most byte
Moderators: AmigoJack, bbadmin, helios, MudGuard
Re: Find right-most byte
Isn't the rightmost byte of the red line in your example "0"? Are you asking how to find a line where their last character is "9"? If so:
Find what: 9$
[x] Regular expression
Find what: 9$
[x] Regular expression
-
ben_josephs
- Posts: 2464
- Joined: Sun Mar 02, 2003 9:22 pm
I will make my question clearer:
How can I delete all of the zeroes to the right of the last 9 in each
line?
For example, here are some rows:
0000000000000000000009990000000
0000000099099000000000000000000
9999000000000000000000000000000
0000000000000000000000000099900
0000000000000099999990000000000
0900000000000000000000000000000
0000000000000000099999000000000
This is result I'm looking for:
000000000000000000000999
0000000099099
9999
00000000000000000000000000999
000000000000009999999
09
0000000000000000099999
Then, how do I find the longest line?
How can I delete all of the zeroes to the right of the last 9 in each
line?
For example, here are some rows:
0000000000000000000009990000000
0000000099099000000000000000000
9999000000000000000000000000000
0000000000000000000000000099900
0000000000000099999990000000000
0900000000000000000000000000000
0000000000000000099999000000000
This is result I'm looking for:
000000000000000000000999
0000000099099
9999
00000000000000000000000000999
000000000000009999999
09
0000000000000000099999
Then, how do I find the longest line?
-
ben_josephs
- Posts: 2464
- Joined: Sun Mar 02, 2003 9:22 pm