Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ORION.MC.DUKE.EDU!bet From: bet@ORION.MC.DUKE.EDU (Bennett Todd) Newsgroups: gnu.bash.bug Subject: Re: regular expressions Message-ID: <8909182127.AA08977@orion> Date: 18 Sep 89 21:27:40 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 21 > case $domain in > \(.*\)\.\(.*\)\.edu) > department=\1 > university=\2 > *) > # ... > esac Hmm. I don't mind the current notion of "case" using globbing rather than r.e. matching. expr(1) makes r.e. substitution available easily enough. I'd rather see expr(1) built in for performance reasons (like echo, test, etc.) than see the definition of the case construct changed, or see another extended case construct added. By the way, I would code the above example: department=`expr $domain : '\([^.]*\)\..*$'` university=`expr $domain : '[^.]*\.\([^.]*\)\..*$' -Bennett bet@orion.mc.duke.edu