in reply to Matching lines in a file that end in numbers (was: regular expression)
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
|
|---|