Backport Tim's checkin 1.9: SF bug 418615: regular expression bug in pipes.py. Obviously bad regexps, spotted by Jeffery Collins.