Re: apt-cache regex question

2011-03-13 Thread Dom
On 13/03/11 13:58, Camaleón wrote: On Sat, 12 Mar 2011 21:06:58 +, Camaleón wrote: (...) The manual page should be then updated accordingly to reflect the current status of the "--names-only" argument :-) Done: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=618017 Thank you, I sho

Re: apt-cache regex question

2011-03-13 Thread Camaleón
On Sat, 12 Mar 2011 21:06:58 +, Camaleón wrote: (...) > The manual page should be then updated accordingly to reflect the > current status of the "--names-only" argument :-) Done: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=618017 Greetings, -- Camaleón -- To UNSUBSCRIBE, email t

Re: apt-cache regex question

2011-03-12 Thread Camaleón
On Sat, 12 Mar 2011 20:09:29 +, Dom wrote: > On 12/03/11 19:25, Camaleón wrote: (...) >> So indeed, only package name should be queried in the regex which does >> not seem to be the case. I also get false positives, for example: >> >> sm01@stt008:~$ apt-cache --names-only search "^a" | grep

Re: apt-cache regex question

2011-03-12 Thread Dom
On 12/03/11 19:25, Camaleón wrote: On Sat, 12 Mar 2011 18:17:47 +, Camaleón wrote: On Sun, 13 Mar 2011 19:22:38 +0200, Πρεκατές Αλέξανδρος wrote: apt-cache --names-only search '^a' except from packages name started with 'a' (intented) will also give packages that they have a source f

Re: apt-cache regex question

2011-03-12 Thread Camaleón
On Sat, 12 Mar 2011 18:17:47 +, Camaleón wrote: > On Sun, 13 Mar 2011 19:22:38 +0200, Πρεκατές Αλέξανδρος wrote: > >> apt-cache --names-only search '^a' except from packages name started >> with 'a' (intented) will also give packages that they have a source >> file whos name starts with

Re: apt-cache regex question

2011-03-12 Thread Camaleón
On Sun, 13 Mar 2011 19:22:38 +0200, Πρεκατές Αλέξανδρος wrote: > apt-cache --names-only search '^a' except from packages name started > with 'a' (intented) will also give packages that they have a source > file whos name starts with 'a'. is that an error? (...) Hum... from man "apt-cache" p

apt-cache regex question

2011-03-12 Thread Πρεκατές Αλέξανδρος
Hi apt-cache --names-only search '^a' except from packages name started with 'a' (intented) will also give packages that they have a source file whos name starts with 'a'. is that an error? eg: $apt-cache --names-only search '^a' ... xul-ext-adblock-plus ... $ apt-cache show xul-ex

Re: regex question

2008-04-13 Thread Alex Samad
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

Re: regex question

2008-04-13 Thread Alex Samad
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[?] >

Re: regex question

2008-04-13 Thread Daniel Burrows
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

Re: regex question

2008-04-13 Thread Mumia W..
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 [...]

Re: regex question

2008-04-13 Thread Alex Samad
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

Re: regex question

2008-04-13 Thread Alex Samad
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

Re: regex question

2008-04-12 Thread Bob Proulx
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

Re: regex question

2008-04-12 Thread Daniel Burrows
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

Re: regex question

2008-04-12 Thread Owen Townend
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 ':^$:

Re: regex question

2008-04-12 Thread Douglas A. Tutty
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

regex question

2008-04-12 Thread Alex Samad
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. so i tried changing it to perl perl -e 'while(<>){chomp ; next if ( /^\s*;/); print "[$_]\n"}' sip.conf whic

Re: Regex Question

2007-07-18 Thread Bob McGowan
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

Re: Regex Question

2007-07-18 Thread Daniel Burrows
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, '

Re: Regex Question

2007-07-16 Thread Bob McGowan
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

Re: Regex Question

2007-07-13 Thread Florian Kulzer
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

Re: Regex Question

2007-07-13 Thread Brad Rogers
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 _

Re: Regex Question

2007-07-13 Thread William Pursell
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

[SOLVED] Regex Question

2007-07-13 Thread Telly Williams
On Fri, Jul 13, 2007 at 02:56:39PM -0700, Steven Ringwald wrote: > I think egrep handles regular expressions, while grep just does the > simple string matching. > > Hope this helps! Steve, Thanks, it worked. TW -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubs

Re: Regex Question

2007-07-13 Thread Steven Ringwald
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

Re: Regex Question

2007-07-13 Thread Alex Samad
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

Regex Question

2007-07-13 Thread Telly Williams
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 understanding of alternation

Re: REGEX question

2002-01-22 Thread martin f krafft
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

Re: REGEX question

2002-01-22 Thread Henry House
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: (.

Re: REGEX question

2002-01-22 Thread Mark Ferlatte
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

Re: REGEX question

2002-01-21 Thread Michael P. Soulier
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

REGEX question

2002-01-21 Thread Alec
Hi How can I match the same character repeated n times? ".{n}" matches any n characters. Thanks Alec