🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.bash.bug
Article #522

Re: regular expressions

#522
From: Rayan Zachariassen
Date: Wed, 30 Aug 1989 16:49
31 lines
1083 bytes
>   Date: 25 Aug 89 16:12:23 GMT
>   From: maart@star.cs.vu.nl  (Maarten Litmaath)
>   Organization: V.U. Informatica, Amsterdam, the Netherlands

>   I've always wanted to be able to do something like the following:

>	   case $domain in
>	   \(.*\)\.\(.*\)\.edu)
>		   department=\1
>		   university=\2
>	   *)
>		   # ...
>	   esac

>   instead of ...

You will obviously like the ZMailer configuration language: a modern shell
with exactly this extension (originally in the case statement but it will
be a 'sift' statement in the next version).  Oh, and the way to write it
is

sift $domain in
(.)\.(.)\.edu)
	department=\1
	university=\2
	;;
tfis

because I use token-based REs.

rayan
Technical Details
Message-ID: <89Aug30.124846edt.2300@neat.cs.toronto.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!neat.cs.toronto.edu!rayan
References: <3073@solo4.cs.vu.nl> <8908292100.AA00161@aurel.caltech.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!neat.cs.toronto.edu!rayan
Newsgroups: gnu.bash.bug
From: rayan@cs.toronto.edu (Rayan Zachariassen)
Subject: Re: regular expressions
Message-ID: <89Aug30.124846edt.2300@neat.cs.toronto.edu>
References: <3073@solo4.cs.vu.nl> <8908292100.AA00161@aurel.caltech.edu>
Distribution: gnu
Date: 30 Aug 89 16:49:48 GMT