ngrep is an awesomly powerful network too which strives to provide most of GNU grep's common features, applying them to the network layer. ngrep is a pcap-aware tool that will allow you to specify extended regular expressions to match against data payloads of packets. It currently recognizes TCP, UDP and ICMP across Ethernet, PPP, SLIP and null interfaces, and understands bpf filter logic in the same fashion as more common packet sniffing tools, such as tcpdump and snoop.
4c0884ad00e2919c86d1cfe78ab06529bedc2f0bdc968e4f57f3454163b4fa1b