From: Dan N on
Sorry, this may not be the best newsgroup, but it is the most Linux savvy
of any I know.

I'm trying to figure out a regular expression to match a line with more
than 2 '-' characters in it. Is this possible?

Dan
From: D. Stussy on
"Dan N" <dan(a)localhost.net> wrote in message
news:47faef10$0$13273$5a62ac22(a)per-qv1-newsreader-01.iinet.net.au...
> Sorry, this may not be the best newsgroup, but it is the most Linux savvy
> of any I know.
>
> I'm trying to figure out a regular expression to match a line with more
> than 2 '-' characters in it. Is this possible?

(.*)-(.*)-(.*)-(.*)

I don't recall offhand how to collapse that further for the 3 repetitions of
"-(.*)" but the above should work.


From: Dan N on
On Mon, 07 Apr 2008 21:17:09 -0700, D. Stussy wrote:

> (.*)-(.*)-(.*)-(.*)
>
> I don't recall offhand how to collapse that further for the 3 repetitions of
> "-(.*)" but the above should work.

Thanks

Dan
From: Unruh on
Dan N <dan(a)localhost.net> writes:

>Sorry, this may not be the best newsgroup, but it is the most Linux savvy
>of any I know.

>I'm trying to figure out a regular expression to match a line with more
>than 2 '-' characters in it. Is this possible?

/.*-.*-.*-/

This is hardly a networking question.



>Dan
From: LEE Sau Dan on
>>>>> "Unruh" == Unruh <unruh-spam(a)physics.ubc.ca> writes:

>> I'm trying to figure out a regular expression to match a line
>> with more than 2 '-' characters in it. Is this possible?

Unruh> /.*-.*-.*-/

Unruh> This is hardly a networking question.

It looks like a homework question.



--
Lee Sau Dan §õ¦u´° ~{@nJX6X~}

E-mail: danlee(a)informatik.uni-freiburg.de
Home page: http://www.informatik.uni-freiburg.de/~danlee