On Sun, Apr 13, 2008 at 08:00:00AM -0700, Daniel Burrows wrote:
> On Sun, Apr 13, 2008 at 10:00:42PM +1000, Alex Samad <[EMAIL PROTECTED]> was
> heard to say:
> > On Sat, Apr 12, 2008 at 06:26:26PM -0700, Daniel Burrows wrote:
> > > On Sun, Apr 13, 2008 at 09:37:02AM +1000, Alex Samad <[EMAIL PROT
On Sun, Apr 13, 2008 at 09:21:51AM -0500, Mumia W.. wrote:
> On 04/13/2008 07:00 AM, Alex Samad wrote:
>> Yes I did (thanks twice), but my question which arose from this was why
>> this did not work
>>
>> perl -nle 'next if ( /^\s*;/); print' sip.conf
>>
>> why do I need the length statement[?]
>
On Sun, Apr 13, 2008 at 10:00:42PM +1000, Alex Samad <[EMAIL PROTECTED]> was
heard to say:
> On Sat, Apr 12, 2008 at 06:26:26PM -0700, Daniel Burrows wrote:
> > On Sun, Apr 13, 2008 at 09:37:02AM +1000, Alex Samad <[EMAIL PROTECTED]>
> > was heard to say:
> > > this started out as a grep quetion
On 04/13/2008 07:00 AM, Alex Samad wrote:
Yes I did (thanks twice), but my question which arose from this was why
this did not work
perl -nle 'next if ( /^\s*;/); print' sip.conf
why do I need the length statement[?]
perl -nle 'next if ( /^\s*;/); print if length $_ > 0' sip.conf
[...]
On Sat, Apr 12, 2008 at 06:26:26PM -0700, Daniel Burrows wrote:
> On Sun, Apr 13, 2008 at 09:37:02AM +1000, Alex Samad <[EMAIL PROTECTED]> was
> heard to say:
> > this started out as a grep quetion
> >
> > trying to look at a file with out the comments in it
> >
> > i tried grep -v '^\s*;' ; is
On Sun, Apr 13, 2008 at 11:22:13AM +1000, Owen Townend wrote:
> On 13/04/2008, Alex Samad <[EMAIL PROTECTED]> wrote:
> >
> > this started out as a grep quetion
> >
> > trying to look at a file with out the comments in it
> >
> > i tried grep -v '^\s*;' ; is the comment delimiter.
> >
> > but this
Alex Samad wrote:
> trying to look at a file with out the comments in it
> i tried grep -v '^\s*;' ; is the comment delimiter.
> but this left me with lots of blank lines.
Try this:
sed 's/[[:space:]]*;.*//' file | less -s
The 'less -s' squeezes consecutive blank lines. See also 'more -s'
an
On Sun, Apr 13, 2008 at 09:37:02AM +1000, Alex Samad <[EMAIL PROTECTED]> was
heard to say:
> this started out as a grep quetion
>
> trying to look at a file with out the comments in it
>
> i tried grep -v '^\s*;' ; is the comment delimiter.
>
> but this left me with lots of blank lines.
Hav
On 13/04/2008, Alex Samad <[EMAIL PROTECTED]> wrote:
>
> this started out as a grep quetion
>
> trying to look at a file with out the comments in it
>
> i tried grep -v '^\s*;' ; is the comment delimiter.
>
> but this left me with lots of blank lines.
>
Hey,
Try this:
`sed -e 's:;.*::' -e ':^$:
On Sun, Apr 13, 2008 at 09:37:02AM +1000, Alex Samad wrote:
> this works
> perl -e 'while(<>){chomp ; next if ( /^\s*;/); print "[$_]\n" if length
> $_ > 0}' sip.conf
>
> or this
> perl -nle 'next if ( /^\s*;/); print if length $_ > 0' sip.conf
>
> why doesn't the next force a read of a new
Daniel Burrows wrote:
On Mon, Jul 16, 2007 at 09:43:32AM -0700, Bob McGowan <[EMAIL PROTECTED]> was
heard to say:
Next, grep supports what most would now call a subset of full regular
expression syntax. This does not include parenthesis or alternation. So
when you put a backslash in front of
On Mon, Jul 16, 2007 at 09:43:32AM -0700, Bob McGowan <[EMAIL PROTECTED]> was
heard to say:
> Next, grep supports what most would now call a subset of full regular
> expression syntax. This does not include parenthesis or alternation. So
> when you put a backslash in front of the pipe symbol, '
Telly Williams wrote:
Hi,
I'm reading up on Regular Expressions and I have a question about
alternation.
I have the sentences: "There was a dog in the house." & "A house on the
hill."
Both of these are in a file (named "regex") on two different lines.
My unde
On Fri, Jul 13, 2007 at 15:49:23 -0600, Telly Williams wrote:
> Hi,
>
> I'm reading up on Regular Expressions and I have a question about
> alternation.
>
> I have the sentences: "There was a dog in the house." & "A house on
> the hill."
>
> Both of these are in a file (named "regex") on two diffe
On Fri, 13 Jul 2007 14:56:39 -0700
Steven Ringwald <[EMAIL PROTECTED]> wrote:
Hello Steven,
> I think egrep handles regular expressions, while grep just does the
> simple string matching.
"egrep" is simply a bash script that calls "grep -E"
"fgrep" does something similar.
--
Regards _
Telly Williams wrote:
I'm reading up on Regular Expressions and I have a question about
alternation.
I have the sentences: "There was a dog in the house." & "A house on the
hill."
Both of these are in a file (named "regex") on two different lines.
My underst
Telly Williams wrote:
Hi,
I'm reading up on Regular Expressions and I have a question about
alternation.
I have the sentences: "There was a dog in the house." & "A house on the
hill."
Both of these are in a file (named "regex") on two different lines.
My unde
On Fri, Jul 13, 2007 at 03:49:23PM -0600, Telly Williams wrote:
> Hi,
>
> I'm reading up on Regular Expressions and I have a question about
> alternation.
>
> I have the sentences: "There was a dog in the house." & "A house on the
> hill."
>
> Both of these are in a file (nam
also sprach Mark Ferlatte <[EMAIL PROTECTED]> [2002.01.22.1914 +0100]:
> > How can I match the same character repeated n times?
> > ".{n}" matches any n characters.
>
> "a{3}" will match aaa, , and a.
but only aaa, and so on. not *any* letter repeated n times. i had a
hard time inter
On Mon, Jan 21, 2002 at 05:07:21PM -0500, Alec wrote:
> Hi
>
> How can I match the same character repeated n times?
> ".{n}" matches any n characters.
You want to remember the first character and match the same using a
backreference. In grep:
\(.\)\1
In egrep, perl, or ruby:
(.
On Mon, Jan 21, 2002 at 05:07:21PM -0500, Alec wrote (1.00):
> How can I match the same character repeated n times?
> ".{n}" matches any n characters.
"a{3}" will match aaa, , and a.
"b{7}" will match bbb, etc.
HTH,
M
pgpqK6YENOpuY.pgp
Description: PGP signature
On 21/01/02 Alec did speaketh:
> Hi
>
> How can I match the same character repeated n times?
> ".{n}" matches any n characters.
How about this:
/(.)\1{n-1}/
I'm assuming perl syntax, so adjust accordingly.
Mike
--
Michael P. Soulier <[EMAIL PROTECTED]>, GnuPG pub key: 5BC8BE08
"...the word
22 matches
Mail list logo