Hi,
I tried to replace three letters with three letters by awk using the
sub-routine.
I assumed that my regular expression does mean the following:
match if three letters of any letter of alphabet occurs anywhere in input
$ echo AbC | awk '{sub(/[[:alpha:]]{3}/,cBa); print;}'
AbC
As you can
On Thu, 02 Aug 2012 13:20:52 +0200
kaltheat wrote:
Hi,
I tried to replace three letters with three letters by awk using the
sub-routine. I assumed that my regular expression does mean the
following:
match if three letters of any letter of alphabet occurs anywhere in
input
$ echo
On Thu, 2 Aug 2012, RW wrote:
On Thu, 02 Aug 2012 13:20:52 +0200
kaltheat wrote:
I tried to replace three letters with three letters by awk using the
sub-routine. I assumed that my regular expression does mean the
following:
match if three letters of any letter of alphabet occurs anywhere in
I've noticed for some time that claws-mail and less (which I think use
libc's regex(3)) don't support word boundaries in searches. I might be
delusional, but I think I've used \b in the past in both of those
applications in FreeBSD.
According to regex(3) it's an implementation POSIX.2, so
RW rwmailli...@googlemail.com writes:
I've noticed for some time that claws-mail and less (which I think use
libc's regex(3)) don't support word boundaries in searches. I might be
delusional, but I think I've used \b in the past in both of those
applications in FreeBSD.
According to regex
On Mon, 2011-09-26 at 22:02 -0400, grarpamp wrote:
Under the ERE implementation in RELENG_8, I'm having
trouble figuring out how to group and backreference this.
Given a line, where:
If AAA is present, CCC will be too, and B may appear in between.
If AAA is not present, neither CCC or B
On 27/09/2011 03:02, grarpamp wrote:
Under the ERE implementation in RELENG_8, I'm having
trouble figuring out how to group and backreference this.
Given a line, where:
If AAA is present, CCC will be too, and B may appear in between.
If AAA is not present, neither CCC or B will be
Under the ERE implementation in RELENG_8, I'm having
trouble figuring out how to group and backreference this.
Given a line, where:
If AAA is present, CCC will be too, and B may appear in between. If AAA
is not present, neither CCC or B will be present.
is always present.
Junk may be
I think I'm grokking my mistake with the greedy stuff now.
I'll try implementing a couple of your suggestions.
Thanks guys!
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send
Under the ERE implementation in RELENG_8, I'm having
trouble figuring out how to group and backreference this.
Given a line, where:
If AAA is present, CCC will be too, and B may appear in between.
If AAA is not present, neither CCC or B will be present.
is always present.
Junk may be
On Sat, 4 Dec 2010 20:32:57 -0800
Gary Kline kl...@thought.org wrote:
On Sat, Dec 04, 2010 at 06:49:45PM -0800, xSAPPYx wrote:
Also, the + operator means '1 or more' but needs escaped:
%s/[0-9]\+/foo/g
Okay. I thought that the + must be perl-only regex... .
It's from Extended
In freebsd-questions Digest, Vol 339, Issue 11, Message: 30
On Sat, 4 Dec 2010 18:23:08 -0800 Gary Kline kl...@thought.org wrote:
On Sat, Dec 04, 2010 at 05:56:59PM -0800, per...@pluto.rain.com wrote:
Joshua Gimer jgi...@gmail.com wrote:
On Sat, Dec 4, 2010 at 5:26 PM, Gary Kline
translate to: They're taking their stuf over
there.
Anybody interested in this, please take it Off-Line, okay.
And thax for yer regex help :-)
gary
--
Gary Kline kl...@thought.org http://www.thought.org Public Service Unix
Journey Toward the Dawn, E
Joshua == Joshua Gimer jgi...@gmail.com writes:
Joshua On Sat, Dec 4, 2010 at 5:26 PM, Gary Kline kl...@thought.org wrote:
I have tried :1,$/s/[0-9]][0-9][0-9]/foo/g
Joshua Why not just %s/[0-9]*/foo/g
Because that would turn a line of fred into foofred. :)
--
Randal L. Schwartz -
Gary == Gary Kline kl...@thought.org writes:
Gary %s/[1-0][0-9]*/foo/g
Except 1-0 is an empty set. :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/
Smalltalk/Perl/Unix consulting, Technical writing,
Quoth Polytropon on Sunday, 05 December 2010:
PS: See, this is why I keep cheatsheets. ;)
That's the fat green book on my shelf. :-)
For regex reference, I find this site helpful:
http://www.regular-expressions.info/reference.html
... especially regarding differences between
be perl-only regex... .
It's from Extended REs rather than perl specifically, it works
with sed -E but not plain sed. Not sure about vi.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
On Sun, Dec 05, 2010 at 09:37:58AM -0800, Randal L. Schwartz wrote:
Gary == Gary Kline kl...@thought.org writes:
Gary %s/[1-0][0-9]*/foo/g
Except 1-0 is an empty set. :)
Ya, sure, you-betcha! I really did mean a '9'there. For some
reason, what I'm thinking
On Sun, Dec 05, 2010 at 10:11:34AM -0800, Chip Camden wrote:
Quoth Polytropon on Sunday, 05 December 2010:
PS: See, this is why I keep cheatsheets. ;)
That's the fat green book on my shelf. :-)
For regex reference, I find this site helpful:
http://www.regular
:
%s/[0-9]\+/foo/g
Okay. I thought that the + must be perl-only regex... .
It's from Extended REs rather than perl specifically, it works
with sed -E but not plain sed. Not sure about vi.
For me in works in vim but not in vi.
In vi it requires setting the extended option
Gang,
I was tried to find Jeffrey Friedl's email to figure out some quick
regex when it struck me that the list can clue me in [[I have
figured this out myself several times--well, 3 or 4 anyway--but it
was more trial/error than I need.]]
I have a file with ints from 0 to some N. What
On Sat, Dec 4, 2010 at 5:26 PM, Gary Kline kl...@thought.org wrote:
I have tried :1,$/s/[0-9]][0-9][0-9]/foo/g
Why not just %s/[0-9]*/foo/g
--
Thanks,
Joshua Gimer
---
http://www.linkedin.com/in/jgimer
http://twitter.com/jgimer
http://itsecops.blogspot.com/
On Sat, Dec 04, 2010 at 05:29:49PM -0700, Joshua Gimer wrote:
On Sat, Dec 4, 2010 at 5:26 PM, Gary Kline kl...@thought.org wrote:
I have tried :1,$/s/[0-9]][0-9][0-9]/foo/g
Why not just %s/[0-9]*/foo/g
So I just missed the *? Didn't need to escape the [ or ] ?
---I'll
On Sat, 4 Dec 2010 17:24:30 -0800, Gary Kline kl...@thought.org wrote:
So I just missed the *?
Yes. In regex, * means any amount of, if I remember correctly.
So you don't have to specify precisely how many numbers there
are.
How many lights? :-)
Didn't need to escape
Joshua Gimer jgi...@gmail.com wrote:
On Sat, Dec 4, 2010 at 5:26 PM, Gary Kline kl...@thought.org wrote:
I have tried :1,$/s/[0-9]][0-9][0-9]/foo/g
Why not just %s/[0-9]*/foo/g
Too broad -- it will match the null string. (* means zero or more
instances of whatever preceded it.)
Best RE I
On Sat, Dec 04, 2010 at 05:56:59PM -0800, per...@pluto.rain.com wrote:
Joshua Gimer jgi...@gmail.com wrote:
On Sat, Dec 4, 2010 at 5:26 PM, Gary Kline kl...@thought.org wrote:
I have tried :1,$/s/[0-9]][0-9][0-9]/foo/g
Why not just %s/[0-9]*/foo/g
Too broad -- it will match the null
On Sat, Dec 4, 2010 at 17:56, per...@pluto.rain.com wrote:
Joshua Gimer jgi...@gmail.com wrote:
On Sat, Dec 4, 2010 at 5:26 PM, Gary Kline kl...@thought.org wrote:
I have tried :1,$/s/[0-9]][0-9][0-9]/foo/g
Why not just %s/[0-9]*/foo/g
Too broad -- it will match the null string. (* means
that the + must be perl-only regex... . Then,
nutshell, the most simple expression [fewest keystrokes] would
be:
%s/[1-0][0-9]*/foo/g
--
Gary Kline kl...@thought.org http://www.thought.org Public Service Unix
Journey Toward the Dawn, E-Book: http
On 9/8/10 12:22 PM, Drew Tomlinson wrote:
[snip]
# Deliver other email to folder
:0
* ^From:.*famous-smoke\.com
${HOME}/Maildir/.Shopping/Famous Smoke/Email/
Do you see anything I'm missing?
Drew,
I'll give this one final shot. Try this:
* ^From:(@.*famous-smoke\.com)
On 9/7/2010 5:50 PM, Robert Bonomi wrote:
From owner-freebsd-questi...@freebsd.org Mon Sep 6 12:46:59 2010
Date: Mon, 06 Sep 2010 10:46:47 -0700
From: Drew Tomlinsond...@mykitchentable.net
To: per...@pluto.rain.com
Cc: fr...@shute.org.uk, freebsd-questions@freebsd.org
Subject: Re: Regex Help
2010-09-06 19:46, Drew Tomlinson skrev:
On 9/5/2010 4:02 PM, per...@pluto.rain.com wrote:
Frank Shutefr...@shute.org.uk wrote:
Drew, try this:
* ^From:.*famous-smoke\.com
I think it's not catching it because the period isn't backslash
escaped ...
Unless there's some edge case that I'm not
From owner-freebsd-questi...@freebsd.org Tue Sep 7 14:24:56 2010
Date: Tue, 07 Sep 2010 12:01:40 +0200
From: Bernt Hansson be...@bah.homeip.net
To: Drew Tomlinson d...@mykitchentable.net
Cc: fr...@shute.org.uk, per...@pluto.rain.com, freebsd-questions@freebsd.org
Subject: Re: Regex Help
On 9/5/2010 4:02 PM, per...@pluto.rain.com wrote:
Frank Shutefr...@shute.org.uk wrote:
Drew, try this:
* ^From:.*famous-smoke\.com
I think it's not catching it because the period isn't backslash
escaped ...
Unless there's some edge case that I'm not thinking of, adding a
backslash to
don't think you need the trailing bracket ().
What about this:
* ^From:.*famous-smoke\.com$
Note that I also escaped the period before 'com'.
I think I'd have to have the trailing bracket when specifying the $ at
the end. However maybe the bracket is some special regex character
On Sun, Sep 05, 2010 at 09:33:31AM -0700, Drew Tomlinson wrote:
[snip]
No, still not matching. Basically, why doesn't this header:
From: Famous Smoke Shop annou...@email.famous-smoke.com
Match this procmail recipe:
:0
* ^From:.*famous-smoke.com$
${HOME}/Maildir/.Shopping/Famous
On 7-9-2010 3:51, Frank Shute wrote:
[snip]
I additionally don't like the look of your Maildir. It's quoted, you
should set MAILDIR in procmailrc, you should get rid of the space and
it should end in new. Result:
:0
* ^From:.*famous-smoke\.com
.Shopping/Famous_Smoke/new
I've actually
On 9/3/2010 2:12 PM, Drew Tomlinson wrote:
Hi Glen,
Thank you for your reply.
On 9/3/2010 12:02 PM, Glen Barber wrote:
Hi Drew,
On 9/3/10 2:45 PM, Drew Tomlinson wrote:
I use procmail for mail delivery and I'm trying to concoct the right
regex to match From: headers and deliver
On Sun, Sep 05, 2010 at 09:33:31AM -0700, Drew Tomlinson wrote:
[snip]
No, still not matching. Basically, why doesn't this header:
From: Famous Smoke Shop annou...@email.famous-smoke.com
Match this procmail recipe:
:0
* ^From:.*famous-smoke.com$
${HOME}/Maildir/.Shopping/Famous
On 9/5/10 12:33 PM, Drew Tomlinson wrote:
No, still not matching. Basically, why doesn't this header:
From: Famous Smoke Shop annou...@email.famous-smoke.com
Match this procmail recipe:
:0
* ^From:.*famous-smoke.com$
Hmm.. I just noticed this - I don't think you need the trailing
Frank Shute fr...@shute.org.uk wrote:
Drew, try this:
* ^From:.*famous-smoke\.com
I think it's not catching it because the period isn't backslash
escaped ...
Unless there's some edge case that I'm not thinking of, adding a
backslash to escape a period will never convert a non-match into
a
I use procmail for mail delivery and I'm trying to concoct the right
regex to match From: headers and deliver to a folder. However mail is
sent from various addresses so I want to match all that end with
famous-smoke.com. Here's an example of a header:
From: Famous Smoke Shopannou
Hi Drew,
On 9/3/10 2:45 PM, Drew Tomlinson wrote:
I use procmail for mail delivery and I'm trying to concoct the right
regex to match From: headers and deliver to a folder. However mail is
sent from various addresses so I want to match all that end with
famous-smoke.com. Here's an example
Hi Glen,
Thank you for your reply.
On 9/3/2010 12:02 PM, Glen Barber wrote:
Hi Drew,
On 9/3/10 2:45 PM, Drew Tomlinson wrote:
I use procmail for mail delivery and I'm trying to concoct the right
regex to match From: headers and deliver to a folder. However mail is
sent from various
in message 471394.79697...@web111611.mail.gq1.yahoo.com,
wrote George Sanders thusly...
I have added a very standard, very common regex line to my
.procmailrc to filter character sets I can't read:
UNREADABLE='[^?]*big5|iso-2022-jp|ISO-2022-KR|euc-kr|gb2312|ks_c_5601-1987|ks_c_5601|3Deuc-kr
On 3/29/2010 3:27 AM, p...@pair.com wrote:
From: osdeiiftn...@gmail.com xjyfgz...@gmail.com
Reply-To: osdeiiftn...@gmail.com xjyfgz...@gmail.com
Message-ID: 533pbxxy2oc
To: me m...@me.com
Subject: Fw:
I have added a very standard, very common regex line to my .procmailrc to
filter character sets I can't read:
UNREADABLE='[^?]*big5|iso-2022-jp|ISO-2022-KR|euc-kr|gb2312|ks_c_5601-1987|ks_c_5601|3Deuc-kr|koi8'
:0:
* ^Content-Type:.*multipart
* B ?? $ ^Content-Type:.*^?.*charset=?($UNREADABLE
On 3/28/2010 6:34 PM, George Sanders wrote:
I have added a very standard, very common regex line to my
.procmailrc to filter character sets I can't read:
UNREADABLE='[^?]*big5|iso-2022-jp|ISO-2022-KR|euc-kr|gb2312|ks_c_5601-1987|ks_c_5601|3Deuc-kr|koi8'
:0:
* ^Content-Type:.*multipart
* B
Case in point regarding the server. Please cc me as I'm not
subscribed via this account, and I can't receive for the same reason I
can't send- damn Yahoo!
If anyone can help though it would be much appreciated- on both the
regex or the yahoo problem :)
Cheers
Need_some_regex_help_
On Fri, 16 Oct 2009 22:25:13 -0700, Gary Kline kl...@thought.org wrote:
I would like to put back the
huge text file into its 66 smaller files using split. Can I break this
very large journeyTowardtheDawn.txt using the regex
Chapter [:digit:]{1,2} ??
Or maybe just
would like to put back the
huge text file into its 66 smaller files using split. Can I break this
very large journeyTowardtheDawn.txt using the regex
Chapter [:digit:]{1,2} ??
Or maybe just Chapter ?
thanks for ideas,
gary
--
Gary
I'm trying to do a search and replace in vim. I have lines like this:
http://site1/dir/;
http://site2/dir/;LastName, FirstName;Phone;
http://site3/dir/;LastName, FirstName;
http://site4/dir/;
I'm want to match http:* and stop matching at the first ;. My basic
regex is:
/http:.\+;/
But it's
matching at the first ;. My basic
regex is:
/http:.\+;/
But it's matching *all* the semi-colons. Thus I've Googled and tried
various incatations to try and make my regex non-greedy but I can't
seem to come up with the correct combination.
How can I write a regex that stops matching
matching at the first ;. My basic
regex is:
/http:.\+;/
But it's matching *all* the semi-colons. Thus I've Googled and tried
various incatations to try and make my regex non-greedy but I can't
seem to come up with the correct combination.
How can I write a regex that stops matching
to match http:* and stop matching at the first ;. My basic
regex is:
/http:.\+;/
But it's matching *all* the semi-colons. Thus I've Googled and tried
various incatations to try and make my regex non-greedy but I can't
seem to come up with the correct combination.
How can I write a regex
/dir/;
I'm want to match http:* and stop matching at the first ;. My
basic regex is:
/http:.\+;/
But it's matching *all* the semi-colons. Thus I've Googled and
tried various incatations to try and make my regex non-greedy but
I can't seem to come up with the correct combination.
How can I
matching at the first ;. My basic
regex is:
/http:.\+;/
Use {-} in place of +.
/http:.\{-};/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail
matching at the first ;. My basic
regex is:
/http:.\+;/
But it's matching *all* the semi-colons. Thus I've Googled and tried
various incatations to try and make my regex non-greedy but I can't
seem to come up with the correct combination.
LOL. Do yourself a favour and stop Googling
Hi all,
Does anyone know of a current mailing list that discusses regular expressions?
I have Googled a number of time, but everything I find is old.
Specifically, I am looking for a modification to this per code:
#!/usr/local/bin/perl
...
my $iframeexp=[\IFRAMEiframe
On Fri, 5 Jun 2009, Grant Peel wrote:
Hi all,
Does anyone know of a current mailing list that discusses regular
expressions?
No. Well I don't anyway.
I have Googled a number of time, but everything I find is old.
Sometimes the old stuff is best. If you had googled very much you should
Hi all,
I've got some performance hit using regex in libc on freebsd 6.3. I've
done some test whit the patterns that l7-filter [http://l7-filter.sf.net] use
to recognize level 7 internet protocol. For example, with the skypeout pattern,
regexec() takes more tha 0.1 sec to do its work
fulvio_esposito wrote:
I've got some performance hit using regex in libc on freebsd 6.3
Knowing that this regex implementation uses an NFA algorithm, while
a DFA algorithm should be preferred, this is no big surprise. You can
read the following references on the subject:
http://swtch.com/~rsc
[EMAIL PROTECTED] wrote:
Hi all,
I've got some performance hit using regex in libc on freebsd 6.3. I've
done some test whit the patterns that l7-filter [http://l7-filter.sf.net] use
to recognize level 7 internet protocol. For example, with the skypeout
pattern,
regexec() takes more tha
Where would I find functionality similar to regcomp(3) and friends,
without the complexities of supporting multiple locales? I only
need the C locale, and would much prefer to avoid the performance
and code size costs associated with handling multi-byte characters.
clue me in on the perl regex for matching
NN plus any/every character following until \n
I can't find my regex book, and am not exactly clear if this
will work, but if I go back over my files and insert braces
around each note (at the page bottom) like:
{14
/A anchor by hand. Maybe not, if
somebody can clue me in on the perl regex for matching
NN plus any/every character following until \n
I can't find my regex book, and am not exactly clear if this
will work, but if I go back over my files and insert braces
is there any pkg avilable that'll convert a regex into plain txt ?
Presently i dont care if its windows based or FreeBSD based
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe
Warren Liddell [EMAIL PROTECTED] wrote:
is there any pkg avilable that'll convert a regex into plain txt ?
What do you mean? What would the plain text translation of
(div|p)[^]*(id|class)=\(Ad.*|Logo|SidebarAds|Tips|Item)\
be?
Fabian
--
http://www.fabiankeil.de/
signature.asc
Description
Warren Liddell wrote:
is there any pkg avilable that'll convert a regex into plain txt ?
No. Most regular expressions cannot be expressed as finite plain text strings,
that is why regex is used in the first place.
Presently i dont care if its windows based or FreeBSD based
Hmm.
--
-Chuck
On Thursday 23 February 2006 15:50, Fabian Keil wrote:
Warren Liddell [EMAIL PROTECTED] wrote:
is there any pkg avilable that'll convert a regex into plain txt ?
What do you mean? What would the plain text translation of
(div|p)[^]*(id|class)=\(Ad.*|Logo|SidebarAds|Tips|Item
On 2/23/06, Warren Liddell [EMAIL PROTECTED] wrote:
is there any pkg avilable that'll convert a regex into plain txt ?
Presently i dont care if its windows based or FreeBSD based
___
freebsd-questions@freebsd.org mailing list
http
Take a look at RegEx Coach it has several ways to express what the regex
string is doing. It's got
lots of other neat tools as well:
http://www.weitz.de/regex-coach/
--chip
--
Just my $.02, your mileage may vary, batteries not included, etc
Thanks, i'll give it a shot
On 6/23/05, Olivier Nicole [EMAIL PROTECTED] wrote:
Thanks Titus,
no, you're misunderstanding regoff_t or printf.
I definitely misunderstand printf. Until now I thought that each place
holder (%d) was associated with one variable and if the type
missmatched, the display could be
I must missunderstand how to use regex(3).
To add a bit, running the same program on Linux gives the expected results:
regexpr=a(.)c
number of substrings=1
return from regexec=0
nmatch=0
p0.so=0 p0.eo=0
p1.so=0 p1.eo=0
p2.so=0 p2.eo=0
p3.so=0 p3.eo=0
return from regexec=0
nmatch=1
p0.so=0 p0.eo
Olivier Nicole schrieb:
Hi,
I must missunderstand how to use regex(3).
no, you're misunderstanding regoff_t or printf.
it's a 64 bit type. thus your printf should read:
ret=regexec(preg, string, nmatch, pmatch, 0);
printf(return from regexec=%d\nnmatch=%d\np0.so=%lld p0.eo=%lld\np1.so=%lld
Thanks Titus,
no, you're misunderstanding regoff_t or printf.
I definitely misunderstand printf. Until now I thought that each place
holder (%d) was associated with one variable and if the type
missmatched, the display could be incorrect.
But in that case, printf seems to take 2 successive %d
Hi,
I must missunderstand how to use regex(3).
From what I read in the man page, pmatch[i].rm_so is the begining of
the i-th match in the regular expression and pmatch[i].rm-so is the
end.
So if I try to match the regex a(.)c on the string abc I should
have: pamtch[1].rm_so=1 and pmatch[1
On Monday 27 September 2004 21:28, Gary Kline wrote:
I have a document with numbered paragraphs, the numbers
to the far left of each paragraph. Is there a perl
s/NNN/BNNN//BBR/g means I can use from the CL or
as a script to make this doc more easy (for me) to read.
The document is
REGEX book. But Tom Embt's
example was right on the money. (FWIW, I've learned
to never try to explain to non-nerds what a
regular expression is. They give me strange looks!)
thanks,
gary
--
Gary Kline [EMAIL PROTECTED] www.thought.org
/p/li@;print' input.txt;
echo /ol/body/html) output.html
Without the line breaks, of course.
This might be closer, plugging in your ;print and Tom's
regex, since the doc is plaintext, maybe ASCII. But then
I'll want to put P or BR tags before each (\d+)
line
Hi Gang,
I have a document with numbered paragraphs, the numbers
to the far left of each paragraph. Is there a perl
s/NNN/BNNN//BBR/g means I can use from the CL or
as a script to make this doc more easy (for me) to read.
The document is
How about something like (assuming space between numbering and paragraph
is a tab):
perl -pi -e 's,^(\d)\t,B$1/BBR,' filename
Atle
-
Flying Crocodile Inc, Unix Systems Administrator
___
[EMAIL PROTECTED] mailing list
I'm trying to do something very simple, that is, restore just mp3 files
from a set of tapes.
However, none of the expressions I'm using will work..
restore -tvNf /dev/nsa1 expression; where epxressions I have tried are
*mp3
*.mp3
.*mp3
^*.mp3
^*.mp3$
^.*mp3$
It seems any expression consisting of
/public/murphys/produced/tricks.html HTTP/1.0 200 5446 -
Mozilla/4.77 [en] (X11; U; Linux 2.2.19 i686)
I'm using the this command:
egrep -e ^123\.456\.789\.123.*htm.* /path/to/file
However this does not match anything. If I shorten the regex to
^123\.456\.789\.123, I match all entries
However this does not match anything. If I shorten the regex to
^123\.456\.789\.123, I match all entries with that IP address. And if I
use 'htm' as the regex, I get match all lines with html files. But I
can't find the right syntax to match on both conditions.
You could try piping
'*' as a wildcard.
I.e. try
egrep -e '^123\.456\.789\.123.*htm.*' /path/to/file
Thank you! Yes, this works as I expect.
However this does not match anything. If I shorten the regex to
^123\.456\.789\.123, I match all entries with that IP address. And if I
use 'htm' as the regex, I get match all lines
On Thu, Aug 28, 2003 at 08:26:43AM +0900, Roger Williams wrote:
I know thins is not the place but I know one of you know this one off the
top of your head.
I have:
$list = dog 1 1 1 cat 2 1 snake 111
and I want to end up with:
dog 1 cat 2 snake 1
I thought
$list =~ s/ \d \d/ \d/g;
On Thu, 28 Aug 2003, Roger Williams wrote:
I know thins is not the place but I know one of you know this one off the
top of your head.
I have:
$list = dog 1 1 1 cat 2 1 snake 111
and I want to end up with:
dog 1 cat 2 snake 1
I thought
$list =~ s/ \d \d/ \d/g;
would do the trick, but
I know thins is not the place but I know one of you know this one off the
top of your head.
I have:
$list = dog 1 1 1 cat 2 1 snake 111
and I want to end up with:
dog 1 cat 2 snake 1
I thought
$list =~ s/ \d \d/ \d/g;
would do the trick, but that gives me:
dog d 1 1 cat d snake d 1
Thanks,
Roger Williams wrote:
I know thins is not the place but I know one of you know this one off the
top of your head.
I have:
$list = dog 1 1 1 cat 2 1 snake 111
and I want to end up with:
dog 1 cat 2 snake 1
I thought
$list =~ s/ \d \d/ \d/g;
would do the trick, but that gives me:
dog d 1
I know thins is not the place but I know one of you know this one off the
top of your head.
I have:
$list = dog 1 1 1 cat 2 1 snake 111
and I want to end up with:
dog 1 cat 2 snake 1
I thought
$list =~ s/ \d \d/ \d/g;
would do the trick, but that gives me:
dog d 1 1 cat d snake d 1
Thanks,
I know thins is not the place but I know one of you know this one off the
top of your head.
I have:
$list = dog 1 1 1 cat 2 1 snake 111
and I want to end up with:
dog 1 cat 2 snake 1
I thought
$list =~ s/ \d \d/ \d/g;
would do the trick, but that gives me:
dog d 1 1 cat d snake d 1
Thanks,
Hi all,
A while back I set something somewhere so that when I add a new user,
the OS (FreeBSD 4.4) sets a default user quota for that new user. I have
since decided to give users more space, but can;t remember where I set up
the default *sigh*. Does anyone know where new user default quotas
Hi.
This is rather off-topic, but as the trouble I'm having is on a FreeBSD
box, I'm hoping you'll excuse me.
What's up with collating sequences and the regcomp(3) function? From the
re_format(7) man page:
Within a bracket expression, a collating element (a character, a multi-
93 matches
Mail list logo