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. :)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.