get certain characters in a string

Hi Everyone,

I have a.txt

12341" <sip:191@vo.my>;asdf=q"
116aaaa<sip:00091@vo.my>;penguin

would like to get the output

[code]
191
00091

[code]

Please advice.

Thanks

will this work?

awk -F"[:@]" '{print $2}' a.txt

Thanks, works perfect :b:

Hey this is a weak attempt at this:

[jaysunn@shine[~]# cat text | awk -F : '{print $2}' | awk -F "@" '{print $1}'
191
00091

It works however.

@anchal_khare

Please explain.

"[:@]"

I know the -F is the field delimiter, however you used 2 of them. Please advise.

Thanks.

Jaysunn

[:@] means take : and @ as delimiters