Thread View: gnu.bash.bug
1 messages
1 total messages
Started by Bennett Todd
Mon, 18 Sep 1989 21:27
Re: regular expressions
Author: Bennett Todd
Date: Mon, 18 Sep 1989 21:27
Date: Mon, 18 Sep 1989 21:27
21 lines
1007 bytes
1007 bytes
> 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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads