Akim Demaille <[EMAIL PROTECTED]>:
> In fact I've thought all the RE engines were the same, so a failing
> sed would be a failing egrep.  But actually the problem we faced was
> an anchor inside a paren group, which I had generalized a bit too fast
> to all the `complex' structures.  Maybe alternation doesn't suffer
> from this.

yes, afaik it's only sed /\(^foo$\)/ that isn't portable.
egrep '(^foo$)' and '^foo|bar$' should be fine.

(sed /\(^foo$\)/ fails to do what you expect on an obscure
OS known as 'solaris', which appears to have two or three
different regexp engines, and about five man pages
describing them.)
--

Reply via email to