#!/usr/bin/tclsh
set string "OSPF_NBRUP OSPF neighbor 16.138.181.15 (realm ospf-v2 e1-0/0/0:37.0 area 0.0.0.0) state changed from Full to Down due to KillNbr"
regexp {(?:\d+\.){3}\d+} $string matched
puts "matched is $matched"
I'm quite new to TCL too. I want to learn the language because of expect, which seems very interesting to me.
I purchased Exploring Expect on amazon and there is a quick TCL tutorial at the beginning of the book.
You could even consult it online on Google books.
I should add that the TCL group on USENET (comp.lang.tcl) is also a great resource.