egrep '\.(V|TO)$' StockList30.txt ----- Original Message ---- From: Vikram Kumar <[EMAIL PROTECTED]> To: [email protected] Sent: Thursday, December 21, 2006 7:53:23 AM Subject: [twincling] GREP - reg exp to find words ending with .V and .TO
Hello Experts, Im trying to extract the words ending with .V or .TO from the following list AVWI.OB AVX AVX-P.V AVXT.OB AVY AVZ AVZ.TO AW AWB.V AWBC AWC AWF AWG AWX.V AXA Im new to grep/regexp, Im breaking my head trying to figure out wot would be the righ grep command for that ... I tried the following options , but im not able to construct the correct regular expression $ grep -o '[ A-Z][a-z].V' StockList30.txt $ grep -o '[ A-Z][a-z].TO' StockList30.txt Plz help me out in constructing the right grep command to retrieve words ending with .V and .TO. Thx in advance. Regards Vikram.

