Pattern matching with awk
Lite Lin
lin at CS.WMICH.EDU
Mon Mar 4 13:10:51 AEST 1991
This is a simple question, but I don't see it in "Freqently Asked
Questions", so...
I'm trying to identify all the email addresses in email messages, i.e.,
patterns with the format user at node. Now I can use grep/sed/awk to find
those lines containing user at node, but I can't figure out from the manual
how or whether I can have access to the matching pattern (it can be
anywhere in the line, and it doesn't have to be surrounded by spaces,
i.e., it's not necessarily a separate "field" in awk). If there is no
way to do that in awk, I guess I'll do it with lex (yytext holds the
matching pattern).
Any response will be appreciated.
Thanks,
Lite
More information about the Comp.unix.questions
mailing list