Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@locus.apache.org Received: (qmail 7857 invoked from network); 21 Aug 2007 16:35:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Aug 2007 16:35:17 -0000 Received: (qmail 39605 invoked by uid 500); 21 Aug 2007 16:35:14 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 39584 invoked by uid 500); 21 Aug 2007 16:35:14 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 39575 invoked by uid 99); 21 Aug 2007 16:35:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Aug 2007 09:35:13 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of djwortham@gmail.com designates 209.85.146.177 as permitted sender) Received: from [209.85.146.177] (HELO wa-out-1112.google.com) (209.85.146.177) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Aug 2007 16:35:08 +0000 Received: by wa-out-1112.google.com with SMTP id k22so1106125waf for ; Tue, 21 Aug 2007 09:34:48 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=ave5w+l+AzThu1xdUdwz9sgHp2oTKVdDzBu+QOsbSp2JmPITLlANX5wc73kpeG7+mp03Hc52lPRf1plEfC6y1h6zTTKCiG2WZcealLN8medeBoRoC7emCkfMIK+9ulE0JZsMfZwFIQQ/cTR3JQDczaTJFsZbdlYW+3vZaURKtn0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=L33u5bGXWY4ycG5K5r+MMrGBBjYJ5PQYU61V3953ZZOU/ySWu1g111aSD+IurBvYcNEnowz34nwWvA+GsuG/SVe3x4KJB735u9gksXVaf2tPc8LpwB5BXWOP9YMNLzZ3J448Q7d3hLM8rtjy1xySyp/QIEVkGtzexT6vL5Dj/O0= Received: by 10.114.149.2 with SMTP id w2mr1264811wad.1187714087630; Tue, 21 Aug 2007 09:34:47 -0700 (PDT) Received: by 10.115.46.6 with HTTP; Tue, 21 Aug 2007 09:34:47 -0700 (PDT) Message-ID: <5280fae50708210934j7cadcaem20d1139849c69cf9@mail.gmail.com> Date: Tue, 21 Aug 2007 09:34:47 -0700 From: "David Wortham" To: modules-dev@httpd.apache.org Subject: Re: Regex Help with Mod Rewrite In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_48275_28079240.1187714087608" References: X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_48275_28079240.1187714087608 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Soumya, This is, in fact, not the correct place to ask such a question. I would direct you to an Apache administrators forum or perhaps try searching the web or message boards/forums/groups for "mod_rewrite help". www.RegularExpressions.info is always a good place to start for help with specific issues with most flavors of RegEx. Without knowing more of the specifics of your RewriteCond restrictions... I would say you want something like "(rain,?|spain,?|plain,?)*" Disclaimer: I did not test this Regex before responding and I know that you can end up with a few false-positive conditions (like when your query string params are not separated by commas) I would venture a guess that Apache uses the PCRE flavor of regex, but I am willing to bet you will find help which directly concerns mod_rewrite more useful than general PCRE RegEx help. Hope this helps. Dave On 8/21/07, Soumya Sanyal wrote: > > Hello, > This might not be the most appropriate forum to field this question - but > I'm having serious issues with the formulation of a regex for Mod Rewrite. > I > actually have a couple of questions to ask : > > 1> What is particular flavor of the regex engine being used by Mod Rewrite > - > there are ever so slight variations in the different regex engines, e.g. > linux grep vs perl grep etc. > 2> I'm having trouble formulating a good compact regex to represent the > following problem : > > I want my RewriteCond to be conditioned on the %{QUERY_STRING} to contain > only the powerset of a group of words e.g. > > Hence if my set is say {rain,spain,plain} > > The RewriteCond should say yes to the following : > http://foo.bar.com/?Operation=rain,spain > http://foo.bar.com/?Operation=plain,rain,rain > http://foo.bar.com/?Operation=plain,rain,spain > > But not : > http://foo.bar.com/?Operation=rain,spain,mainly > > Help please ? > ------=_Part_48275_28079240.1187714087608--