Loading ...
Sorry, an error occurred while loading the content.

29575Re: Regex basics help

Expand Messages
  • anakravitz
    Sep 13, 2012
    • 0 Attachment
      The pipe is really useful but I'm not sure that will work here since it means OR.

      So in this case it would return URLs that contain either the word "product" OR the word "cart". But he wants URLs that contain both of those words together.

      I think the regex that will work is (product.*cart)|(cart.*product).

      If you know that "product" always comes before "cart" you can drop the second part and vice versa. Hope that helps!
      -Ana
      www.akravitz.com

      --- In webanalytics@yahoogroups.com, Mohit Jain <mohit@...> wrote:
      >
      > Hi,
      >
      > Please separate your phrases by a PIPE (|)
      >
      > So in Goal RegEx write product|cart
      >
      > I hope that will help.
      >
      > thanks,
      >
      > Mohit
      > www.mohit.ae
      >
      >
      > On Thu, Sep 13, 2012 at 4:25 AM, WebberAnalytics Smith <
      > webberanalytics@...> wrote:
      >
      > > **
      > >
      > >
      > > Hi All,
      > >
      > > Can anyone give me a quick 101 on regex in GA? Essentially I'd like to
      > > create a URL goal regular expression match for any pages that contain these
      > > 2 phrases in the URL: product and cart
      > > Essentiall my logic is give me any URLs where the URL contains both
      > > 'product' AND 'cart'.
      > >
      > > Help!
      > >
      > > Thanks
      > >
      > > [Non-text portions of this message have been removed]
      > >
      > >
      > >
      >
      >
      > [Non-text portions of this message have been removed]
      >
    • Show all 9 messages in this topic