🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.bash.bug
Article #520

Re: regular expressions

#520
From: Maarten Litmaath
Date: Wed, 30 Aug 1989 15:35
24 lines
1114 bytes
bfox@AUREL.CALTECH.EDU (Brian Fox) writes:
\...	   case $domain in
\	   \(.*\)\.\(.*\)\.edu)
\		   department=\1
\		   university=\2
\	   *)
\		   # ...
\	   esac
\...
\Well, not without changing the semantics of the "case" command, and
\writing a regular expression parser into the shell.
\
\The pattern matcher is a globber, not a RE parser.  Sorry.

Of course; it was never my intention to use the (normal) `case' command for
my idea.  But perhaps a syntax extension would be worthwhile?

	ecase ... in
	...
	esace
[sic]
-- 
C, the programming language that's the same |Maarten Litmaath @ VU Amsterdam:
         in all reference frames.           |maart@cs.vu.nl, mcvax!botter!maart
Technical Details
Message-ID: <3096@solo2.cs.vu.nl>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!mcsun!hp4nl!botter!star.cs.vu.nl!maart
References: <3073@solo4.cs.vu.nl> <8908292100.AA00161@aurel.caltech.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!mcsun!hp4nl!botter!star.cs.vu.nl!maart
From: maart@cs.vu.nl (Maarten Litmaath)
Newsgroups: gnu.bash.bug
Subject: Re: regular expressions
Message-ID: <3096@solo2.cs.vu.nl>
Date: 30 Aug 89 15:35:18 GMT
References: <3073@solo4.cs.vu.nl> <8908292100.AA00161@aurel.caltech.edu>
Distribution: gnu
Organization: V.U. Informatica, Amsterdam, the Netherlands
Lines: 24