Selecting Line Numbers [or, selecting numbers at the left of some lines]

Grrrr. Just when I think I’ve learned enough of those eldritch find-replace formulas, I get stumped again.

I have a long poem with line numbers at the beginning of every fifth line, like so:

450 Blah blah blah blah blah blah and ever more blah

How do I select all of those numbers to reformat them separately from the text on the line? The numbers range from 1 digit to 3 digits. On the left side they are flush with the margin; on the right side they have a tab.

What’s the magic command to select them all?

Thanks

Well, in the vast majority of cases, can work a search string like
^[:space:]*[:digit:]{1,3}[:space:]
But this is the case if the previous line is completed with “real Enter” (marked with a green arrow in the picture), and not Shift + Enter (red arrow)

2 Likes

Why not using Line Numbering (menu Tools)?
Screenshot from 2024-02-13 12-03-41

Because the line numbers were already there, in the text I downloaded. So I could either find a way to format them all, or get rid of them all. I choose the formatting route.

Also, from my playing around with the line number feature, a line of poetry that takes two lines would be counted as two lines, which is not correct, it’s only one line in terms of the poetry. And is it possible to restart from 1 multiple times on a page for each new poem?

1 Like