Return-Path: Delivered-To: apmail-pig-user-archive@www.apache.org Received: (qmail 66040 invoked from network); 3 Dec 2010 03:32:31 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 Dec 2010 03:32:31 -0000 Received: (qmail 33063 invoked by uid 500); 3 Dec 2010 03:32:30 -0000 Delivered-To: apmail-pig-user-archive@pig.apache.org Received: (qmail 32932 invoked by uid 500); 3 Dec 2010 03:32:30 -0000 Mailing-List: contact user-help@pig.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@pig.apache.org Delivered-To: mailing list user@pig.apache.org Received: (qmail 32923 invoked by uid 99); 3 Dec 2010 03:32:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Dec 2010 03:32:30 +0000 X-ASF-Spam-Status: No, hits=3.7 required=10.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of zhguo1@gmail.com designates 74.125.82.177 as permitted sender) Received: from [74.125.82.177] (HELO mail-wy0-f177.google.com) (74.125.82.177) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Dec 2010 03:32:23 +0000 Received: by wyf22 with SMTP id 22so9252765wyf.22 for ; Thu, 02 Dec 2010 19:32:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=fCJbgLGzCII2YKYGtGjI8PCEC6W5ElwGtzJmfBLBmzo=; b=wa9qRvXuDd54fXSw6gcFYvP4SBe0hzIu2TSjRSLCSqrZZF0coGk1d1lWXVzvSzEmVd HtwXJhWEerCcnMwbs6POk4B/LXz4wuAGTA27j5ZRgOz/MSCZ1EemyZIHbQG9wR9P7inb WecUCgFFjkyNzgchNGVoh3NZn1skwxC/DYWhE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=fzFt9ufRgO3LUvqMR0xvAHyQBvzWkMb0vw4z6lI7k+GIuP1Fpr9XvxL6ar53wwFB0n H4D/KOPp/AlczreSsCS7wrd1c+4IW4uysGYz37obcQf21Yu5GO/Y3fzHGEkjHrfd0zAD LCmMwENwZ2nOSZ5uBu1wohtbjefE8c0lSfTVo= MIME-Version: 1.0 Received: by 10.216.7.137 with SMTP id 9mr12123wep.97.1291347122441; Thu, 02 Dec 2010 19:32:02 -0800 (PST) Received: by 10.216.174.81 with HTTP; Thu, 2 Dec 2010 19:32:02 -0800 (PST) Date: Thu, 2 Dec 2010 19:32:02 -0800 Message-ID: Subject: matches with regular expression in pig From: Zhen Guo To: user@pig.apache.org Content-Type: multipart/alternative; boundary=0016364c7e7d83cc6f0496792e21 --0016364c7e7d83cc6f0496792e21 Content-Type: text/plain; charset=ISO-8859-1 Hi all, In pig, we can do pattern matching with regular expression. For a pattern like "abc|.*", how to write the regular expression? I tried the following: A = FILTER B BY (name matches 'abc\|.*'); but it does not work. I cannot use 'abc|.*' because it will match anything. Any ideas are appreciated. Thanks, Zhen --0016364c7e7d83cc6f0496792e21--