in reply to Matching lines in a file that end in numbers (was: regular expression)

Hmmm. Several other monks, wiser than I, have observed that it's very difficult to tell if the trailing number you're stripping is a "good number" (i.e., line number) or a "bad number" to strip. For example,

int i = 100
            + offset;
Some folks have offered the heuristic of looking for a trailing semicolon, etc.

Just wondering - if these really are line numbers, can you make use of $.?

perl -MEnglish -ne 's/$INPUT_LINE_NUMBER$//; print;'

...or something like that.

Sounds like a thorny problem with a large, not-well-known dataset. The only cure for that I know if is to carefully hand-check the result of your output. Good luck.

Peace,
-McD