On Wed, 2011-04-27 at 14:10 -0600, Andrew McNabb wrote: > On Wed, Apr 27, 2011 at 01:54:53PM -0600, Alan Young wrote: > > On Wed, Apr 27, 2011 at 12:42, Charles Curley > > <charlescur...@charlescurley.com> wrote: > > > Or that [he|she|it] has great forbearance. > > I like 's?he|it' better ... > > Unfortunately: > > amcnabb@sage:~ :) echo "sit" |egrep "s?he|it" > sit
Perhaps, but: echo "sit" | sed -r 's/.*(s?he|it).*/Matched: "\1"/;' Or if you're using a reasonable version of grep: $ echo "sit" | egrep --color "s?he|it" /* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */