How to print only the lines that contain three or more sequential consecutive digits?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












have a text file contain list of numbers i want to print only the lines that contain set of three sequential consecutive digits . The input list 123 321 567 765 124 568 12345



The output should contain 123 321 567 765 12345 Thanks
PRINT ONLY THE LINES THAT CONTAIN THREE OR MORE SEQUENTIAL CONSECUTIVE DIGITS.









share























  • Possible duplicate of Filtering out numbers that have sequential- consecutive or non-consecutive digits
    – Jeff Schaller
    3 mins ago














up vote
0
down vote

favorite












have a text file contain list of numbers i want to print only the lines that contain set of three sequential consecutive digits . The input list 123 321 567 765 124 568 12345



The output should contain 123 321 567 765 12345 Thanks
PRINT ONLY THE LINES THAT CONTAIN THREE OR MORE SEQUENTIAL CONSECUTIVE DIGITS.









share























  • Possible duplicate of Filtering out numbers that have sequential- consecutive or non-consecutive digits
    – Jeff Schaller
    3 mins ago












up vote
0
down vote

favorite









up vote
0
down vote

favorite











have a text file contain list of numbers i want to print only the lines that contain set of three sequential consecutive digits . The input list 123 321 567 765 124 568 12345



The output should contain 123 321 567 765 12345 Thanks
PRINT ONLY THE LINES THAT CONTAIN THREE OR MORE SEQUENTIAL CONSECUTIVE DIGITS.









share















have a text file contain list of numbers i want to print only the lines that contain set of three sequential consecutive digits . The input list 123 321 567 765 124 568 12345



The output should contain 123 321 567 765 12345 Thanks
PRINT ONLY THE LINES THAT CONTAIN THREE OR MORE SEQUENTIAL CONSECUTIVE DIGITS.







command-line





share














share












share



share








edited 42 secs ago

























asked 7 mins ago









Ahmed

625




625











  • Possible duplicate of Filtering out numbers that have sequential- consecutive or non-consecutive digits
    – Jeff Schaller
    3 mins ago
















  • Possible duplicate of Filtering out numbers that have sequential- consecutive or non-consecutive digits
    – Jeff Schaller
    3 mins ago















Possible duplicate of Filtering out numbers that have sequential- consecutive or non-consecutive digits
– Jeff Schaller
3 mins ago




Possible duplicate of Filtering out numbers that have sequential- consecutive or non-consecutive digits
– Jeff Schaller
3 mins ago















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f477579%2fhow-to-print-only-the-lines-that-contain-three-or-more-sequential-consecutive-di%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f477579%2fhow-to-print-only-the-lines-that-contain-three-or-more-sequential-consecutive-di%23new-answer', 'question_page');

);

Post as a guest