Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

grep with reqular expression

Status
Not open for further replies.

concino

Programmer
Jan 18, 2004
7
US
how can i filter the numbers between 25-30? (the range is included)

grep '[2][5-9]' filename;

filters only 25 to 29. is there a solution for 25-30?

thanks for the response.

 
Have you tried this ?
Code:
grep -E '2[5-9]|30'
If your grep flavor don't like the -E option, then use egrep.

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top