Path: 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 > 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