Date: Wed, 12 Mar 2003 11:38:29 +0100 (MET) From: Pascal Giannakakis <CapM@gmx.net> To: freebsd-questions@freebsd.org Message-ID: <22358.1047465509@www63.gmx.net>
next in thread | raw e-mail | index | archive | help
Hello, i want to extract a word with a regular expressions from a line of text. Here is what i currently have: grep -c -E 'Interesting ports on [a-zA-Z0-9-.]+ \((.+)\)' This will print lines (from nmap), but i need only the 1st match in parentheses, which is the IP in this case. What programm would i use to print what grep sees as \1, instead of the whole line? Thanx -- +++ GMX - Mail, Messaging & more http://www.gmx.net +++ Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?22358.1047465509>