Monday, 15 March 2010

ubuntu - Using grep to find a specific number in between other numbers -



ubuntu - Using grep to find a specific number in between other numbers -

i'm trying find , 3 digit integers in text file who's middle number 7 using grep command. know how find 3 digit integers (grep '^[0-9]{3}$' textfile.txt) not how specify ones have middle digit of 7. help appreciated!

you utilize grep -p take regex

grep -p "\d7\d" filename

ubuntu grep

No comments:

Post a Comment