Re: Regular expressions

2003-07-10 Thread Reuben D. Budiardja
On Wednesday 09 July 2003 08:13 pm, Edward Dekkers wrote: > I'm still quite a newbie at regular expressions - so please bear with me. > > First the scenario. > > The inbox at my ISP has been flooded with e-mails. All 300-900Kb big, no > subject line, no from line. After tal

Re: Regular expressions

2003-07-09 Thread Edward Dekkers
Anthony E. Greene wrote: On 10-Jul-2003/08:13 +0800, Edward Dekkers <[EMAIL PROTECTED]> wrote: The inbox at my ISP has been flooded with e-mails. All 300-900Kb big, no subject line, no from line. After talks with my ISP, we have determined who they come from, but I'm having trouble contacting

Re: Regular expressions

2003-07-09 Thread Anthony E. Greene
On 10-Jul-2003/08:13 +0800, Edward Dekkers <[EMAIL PROTECTED]> wrote: >The inbox at my ISP has been flooded with e-mails. All 300-900Kb big, no >subject line, no from line. After talks with my ISP, we have determined >who they come from, but I'm having trouble contacting them. Legit e-mail >due

RE: Regular expressions

2003-07-09 Thread Chris W. Parker
Edward Dekkers <mailto:[EMAIL PROTECTED]> wrote: > I'm still quite a newbie at regular expressions - so please bear with > me. I guess I'm a newbie too but did you try: DENY = ^Subject:.{0}$ ($ = End of String) You could also try: DENY = ^Subject:$ See if either

Regular expressions

2003-07-09 Thread Edward Dekkers
I'm still quite a newbie at regular expressions - so please bear with me. First the scenario. The inbox at my ISP has been flooded with e-mails. All 300-900Kb big, no subject line, no from line. After talks with my ISP, we have determined who they come from, but I'm having trouble

Re: regular expressions

2002-09-17 Thread Steven Whatley
On Tue, 17 Sep 2002, Ashwin Khandare wrote: > file abc.txt contains > Sep 15 14:18:54 203.146.91.228:23 202.88.143.72:23 > > The time 14:18:54 (hours:mins:secs) needs to be replaced by 14:18 (hours:mins) for >"n" number of lines in a file Seems to me that: $ cut -c1-12,16-255 file.txt >file2.

Re: regular expressions

2002-09-17 Thread David Kramer
On Tue, 17 Sep 2002, Ashwin Khandare wrote: > hi everybody > > Can anyone tell me how do I search and replace a pattern in file using shell(BASH). > > file abc.txt contains > Sep 15 14:18:54 203.146.91.228:23 202.88.143.72:23 > > > The time 14:18:54 (hours:mins:secs) needs to be replaced by 1

regular expressions

2002-09-17 Thread Ashwin Khandare
hi everybody   Can anyone tell me how do I search and replace a pattern in file using shell(BASH).   file abc.txt contains Sep 15 14:18:54 203.146.91.228:23 202.88.143.72:23     The time 14:18:54 (hours:mins:secs) needs to be replaced by 14:18 (hours:mins) for "n" number of lines in a file  

Re: regular expressions in bash

2002-04-27 Thread Gordon Messmer
On Sat, 2002-04-20 at 19:46, Harry Putnam wrote: > >> In the context of the original post, the comparison was to perl regex. > > > > Perl searches for a regex in a string, rather than matching a pattern on > > a string. > > I disagree, and I think this is the hub of the matter. Regex always > ma

Re: regular expressions in bash

2002-04-20 Thread Harry Putnam
mention of it in the documentation you point to: Quoting here, but not to support the above comments: DESCRIPTION Regular expressions (``RE''s), as defined in POSIX 1003.2, come in two forms: modern REs (roughly those of egrep; 1003.2 calls these ``ex

Re: regular expressions in bash

2002-04-20 Thread Gordon Messmer
On Sat, 2002-04-20 at 17:12, Harry Putnam wrote: > > Not exactly. There are several common sets of regex rules. The one > in find is not as powerfull as what I called the `POSIX' set. Find uses the POSIX regex functions in the C library, not some special, weak code. > > know that Perl provide

Re: regular expressions in bash

2002-04-20 Thread Harry Putnam
Gordon Messmer <[EMAIL PROTECTED]> writes: > On Fri, 2002-04-19 at 14:16, Harry Putnam wrote: >> >> I'm not really sure what constitutes a posix legal regex but I don't >> think it includes trick riders like having to match a specific part >> of a string, unless put into the regex itself with a

Re: regular expressions in bash

2002-04-20 Thread Gordon Messmer
On Fri, 2002-04-19 at 14:16, Harry Putnam wrote: > > I'm not really sure what constitutes a posix legal regex but I don't > think it includes trick riders like having to match a specific part > of a string, unless put into the regex itself with anchors or the > like. A regex is a regex, but a r

Re: regular expressions in bash

2002-04-19 Thread Bill Crawford
On Fri, 19 Apr 2002, Harry Putnam wrote: > Gordon Messmer <[EMAIL PROTECTED]> writes: > > > On Fri, 2002-04-19 at 07:26, Harry Putnam wrote: > >> > >> It is new within a year or so, I believe but if you look close you'll > >> also notice it isn't posix regex > >> > >> The example given shows

Re: regular expressions in bash

2002-04-19 Thread Harry Putnam
Gordon Messmer <[EMAIL PROTECTED]> writes: > On Fri, 2002-04-19 at 07:26, Harry Putnam wrote: >> >> It is new within a year or so, I believe but if you look close you'll >> also notice it isn't posix regex >> >> The example given shows it. >> `b.*r3 >> >> Does not match >> ./fubar3 > > Su

Re: regular expressions in bash

2002-04-19 Thread Gordon Messmer
On Fri, 2002-04-19 at 07:26, Harry Putnam wrote: > > It is new within a year or so, I believe but if you look close you'll > also notice it isn't posix regex > > The example given shows it. > `b.*r3 > > Does not match > ./fubar3 Sure it's a POSIX regex. However, the man page points out t

Re: regular expressions in bash

2002-04-19 Thread Harry Putnam
Bill Crawford <[EMAIL PROTECTED]> writes: > Oops. > > I completely missed that one ... how long's that been there? > > I'm guessing it's probably always been there, like Kosh. I'm sooo > embarrassed now :o) It is new within a year or so, I believe but if you look close you'll also notice it

Re: regular expressions in bash

2002-04-19 Thread Bill Crawford
On 18 Apr 2002, Gordon Messmer wrote: > On Thu, 2002-04-18 at 15:26, daniel wrote: > > i'm a perlgeek > > so i'm familiar with its style of regular expressions > > but when i'm trying to use one of those regular expressions in a find > > command, > &g

Re: regular expressions in bash

2002-04-18 Thread Harry Putnam
"daniel" <[EMAIL PROTECTED]> writes: > i'm a perlgeek > so i'm familiar with its style of regular expressions > but when i'm trying to use one of those regular expressions in a find > command, > i'm not having much luck > here's what i

Re: regular expressions in bash

2002-04-18 Thread Gordon Messmer
On Thu, 2002-04-18 at 15:26, daniel wrote: > i'm a perlgeek > so i'm familiar with its style of regular expressions > but when i'm trying to use one of those regular expressions in a find > command, > > find /home/ -name "(.Apple(.*))|(Network Trash > F

Re: regular expressions in bash

2002-04-18 Thread Bill Crawford
On Thu, 18 Apr 2002, daniel wrote: > i'm a perlgeek > so i'm familiar with its style of regular expressions > but when i'm trying to use one of those regular expressions in a find > command, > i'm not having much luck > here's what i want to do: >

regular expressions in bash

2002-04-18 Thread daniel
i'm a perlgeek so i'm familiar with its style of regular expressions but when i'm trying to use one of those regular expressions in a find command, i'm not having much luck here's what i want to do: find /home/ -name "(.Apple(.*))|(Network Trash Folder)|(TheVolum

Re: Regular expressions

2002-01-27 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Cameron Simpson blurted > [Loads of useful references snipped] > There's more, but those are the basics. "Basic regexps" don't have + or > () or |, except for sed and vi with have () but they need special marking > as \( and \) (for h

Re: Regular expressions

2002-01-26 Thread Cameron Simpson
On 01:26 27 Jan 2002, Nick Wilson <[EMAIL PROTECTED]> wrote: | * and then Cameron Simpson blurted | > man perlre | > | > man egrep | > | > Both tell you quite a lot. | | Yes, thanks Cameron, Bear in mind that there is some variance in regexps. ed and sed and grep and vi have the core rege

Re: Regular expressions

2002-01-26 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Cameron Simpson blurted > man perlre > > man egrep > > Both tell you quite a lot. Yes, thanks Cameron, sorry about the accidental posting on this thread to all who may be following it by the way :) I got an extremely offensive mail

Re: Regular expressions

2002-01-26 Thread Cameron Simpson
On 10:43 26 Jan 2002, Nick Wilson <[EMAIL PROTECTED]> wrote: | Hmmm Thanks guys but I was hoping for something online and *free* :) man perlre man egrep Both tell you quite a lot. -- Cameron Simpson, DoD#743[EMAIL PROTECTED]http://www.zip.com.au/~cs/ [Alain] had been looking a

Re: [OT] Regular expressions

2002-01-26 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Nick Wilson blurted > > * and then Ben Logan blurted > > Try > > > > $ man 7 regex > > Okay, got it. There is a 7 in your command though? (man 7 regex)? > > > Chances are you'll get a manpage describing POSIX REs. It's a bit >

Re: [OT] Regular expressions

2002-01-26 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Ben Logan blurted > Try > > $ man 7 regex Okay, got it. There is a 7 in your command though? (man 7 regex)? > Chances are you'll get a manpage describing POSIX REs. It's a bit > opaque to begin with, though. :) Certainly is! But

Re: [OT] Regular expressions

2002-01-26 Thread Ben Logan
On Sat, Jan 26, 2002 at 10:43:36AM +0100, Nick Wilson wrote: > Hmmm Thanks guys but I was hoping for something online and *free* :) Nick, Try $ man 7 regex Chances are you'll get a manpage describing POSIX REs. It's a bit opaque to begin with, though. :) I can recommend the Python Regex

Re: [OT] Regular expressions

2002-01-26 Thread rpjday
On Fri, 25 Jan 2002, Jonathan Bartlett wrote: > The O'Reilly Perl book (Programming Perl? It's called the camel book) has > an EXCELLENT chapter on how it works. If you run > > perldoc perlre > > Will also give you excellent information. o'reilly also has a

Re: [OT] Regular expressions

2002-01-26 Thread Nick Wilson
* and then David Talkington blurted > >Hi > >I'm trying to find a good guide to regexp > >Anyone reccomend a suitable starting point? > > Absolutely. 'Mastering Regular Expressions', Jeffrey E. F. Friedl, > O'Reilly. Covers regex engine

Re: [OT] Regular expressions

2002-01-25 Thread David Talkington
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Nick Wilson wrote: >Hi >I'm trying to find a good guide to regexp >Anyone reccomend a suitable starting point? Absolutely. 'Mastering Regular Expressions', Jeffrey E. F. Friedl, O'Reilly. Covers regex engines of all

Re: [OT] Regular expressions

2002-01-25 Thread Jonathan Bartlett
The O'Reilly Perl book (Programming Perl? It's called the camel book) has an EXCELLENT chapter on how it works. If you run perldoc perlre Will also give you excellent information. Jon On Fri, 25 Jan 2002, Nick Wilson wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi > I'm

[OT] Regular expressions

2002-01-25 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi I'm trying to find a good guide to regexp Anyone reccomend a suitable starting point? - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux)