No problem, yes I am matching entire lines from my syslog, but am using the capturing parens to pull out a synopsis of the data.
So instead of:
Jun 2 03:09:40 localhost kernel: Shorewall:net2all:DROP:IN=eth0 OUT=
+MAC=00:50:04:70:8c:ba:00:01:96:0d:03:70:08:00 SRC=211.199.195.208 DST
+=24.xx.xx.xxx LEN=48 TOS=0x00 PREC=0x00 TTL=97 ID=35909 DF PROTO=TCP
+SPT=3568 DPT=1025 WINDOW=16384 RES=0x00 SYN URGP=0
I will have this:
IP Proto Sport Dport Count
211.199.195.208 TCP 3568 1025 1
And like I said, this is more for me to learn perl than any other reason. :) |