Thx guys .. for so many alternative solutions!

On 12/21/06, Aditya Lal <[EMAIL PROTECTED]> wrote:
>
>   egrep '\.(V|TO)$' StockList30.txt
>
>
>
> ----- Original Message ----
> From: Vikram Kumar <[EMAIL PROTECTED] <vikram.cvk%40gmail.com>>
> To: [email protected] <twincling%40yahoogroups.com>
> 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.

Reply via email to