Re: regex back matching
- From: Jim Gibson <jimsgibson@xxxxxxxxx>
- Date: Thu, 05 Jun 2008 08:59:21 -0700
In article <Xns9AB467348BD9Fasu1cornelledu@xxxxxxxxx>, A. Sinan Unur
<1usa@xxxxxxxxxxxxxxxxxxx> wrote:
Ray Muforosky <muforo@xxxxxxxxx> wrote in news:8566add6-1bfc-4231-8242-
ba9790cf376f@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:
On Jun 5, 8:14 am, Dan Rumney <danrum...@xxxxxxxxxxxxxxxx> wrote:
Ray Muforosky wrote:
Hello
I need to match on lines where the 4 quadrant of the ip is even with
one line regex.
[snip]
What do you have so far? There are plenty of pages outlinging regexps
for matching IP addresses... that should prove a good start for you
egrep '^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.([stock here])\s*'
filename
What is egrep?
egrep is a version of the Unix grep program that does regular
expressions.
$ man egrep
"GREP(1)
NAME
grep, egrep, fgrep - print lines matching a pattern
SYNOPSIS
grep [options] PATTERN [FILE...]
grep [options] [-e PATTERN | -f FILE] [FILE...]
DESCRIPTION
Grep searches the named input FILEs (or standard input if no files are
named, or the file name - is given) for lines containing a match to the
given PATTERN. By default, grep prints the matching lines.
In addition, two variant programs egrep and fgrep are available. Egrep
is the same as grep -E. Fgrep is the same as grep -F."
So the OP is asking a question about a Unix utility in a Perl group.
--
Jim Gibson
.
- References:
- regex back matching
- From: Ray Muforosky
- Re: regex back matching
- From: Dan Rumney
- Re: regex back matching
- From: Ray Muforosky
- Re: regex back matching
- From: A. Sinan Unur
- regex back matching
- Prev by Date: Re: eperl help: multi-pass processing
- Next by Date: Re: Prevent kill signals to childs
- Previous by thread: Re: regex back matching
- Next by thread: Re: regex back matching
- Index(es):
Relevant Pages
|
|