Yes, in awk use the match() function and give it an optional array parameter ( a in my example). When you do this, the 0th element will be the part that matches the regular expression
$ echo "blah foo123bar blah" | awk '{match($2,"[az]+[0-9]+",a)}END{print a[0]}' foo123
SiegeX Mar 29 '11 at 0:01 2011-03-29 00:01
source share