<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Regular Expressions for GA Bonus 1: {Braces}</title>
	<atom:link href="http://www.lunametrics.com/blog/2007/06/25/regular-expressions-for-ga-bonus-1-braces/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lunametrics.com/blog/2007/06/25/regular-expressions-for-ga-bonus-1-braces/</link>
	<description>Traffic, Analysis, Action</description>
	<lastBuildDate>Sun, 12 Feb 2012 00:37:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: RegEx Jedi Master</title>
		<link>http://www.lunametrics.com/blog/2007/06/25/regular-expressions-for-ga-bonus-1-braces/comment-page-1/#comment-1821</link>
		<dc:creator>RegEx Jedi Master</dc:creator>
		<pubDate>Wed, 12 May 2010 07:44:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.lunametrics.com/blog/2007/06/25/regular-expressions-for-ga-bonus-1-braces/#comment-1821</guid>
		<description>Robin,

Thanks for looking at my RegEx example.

Although I don’t think your reply is correct… I would say that all referrals contain &quot;https&quot; or &quot;http://&quot;

For instance if you create a new profile, and then add this custom filter:
Referral:(.+)
User-defined:$A1

Wait 24hours...
Visitors Tab &gt; User-defined &gt; Contains box ^https?://
...then you will see data.

Maybe you are thinking of the Source field, which does not contain the protocol. e.g. &quot;blog.domain.com&quot;? The referral for this domain would show &quot;http://blog.domain.com/page.htm&quot;.

Thanks anyway.

Phil.

Regarding &quot;Minimal Match&quot; or aka &quot;Lazy Match&quot; rather than Greedy Match. Maybe some more examples would be useful e.g.

match first instance of &quot;&amp;&quot;
\?paramId=(.+?)&amp;

match anything before the first instance of &quot;&amp;&quot;
\?paramId=([^&amp;]+?)
same as \?paramId=([^&amp;]+)&amp;

match 2 to 4 characters  (more efficient method for GA import engine, but no difference in result).
\?paramId=(.{2,4}?)
Ref:http://www.regular-expressions.info/reference.html (link include some RegEx not support by GA RegEx)</description>
		<content:encoded><![CDATA[<p>Robin,</p>
<p>Thanks for looking at my RegEx example.</p>
<p>Although I don’t think your reply is correct… I would say that all referrals contain &#8220;https&#8221; or &#8220;http://&#8221;</p>
<p>For instance if you create a new profile, and then add this custom filter:<br />
Referral:(.+)<br />
User-defined:$A1</p>
<p>Wait 24hours&#8230;<br />
Visitors Tab &gt; User-defined &gt; Contains box ^https?://<br />
&#8230;then you will see data.</p>
<p>Maybe you are thinking of the Source field, which does not contain the protocol. e.g. &#8220;blog.domain.com&#8221;? The referral for this domain would show &#8220;http://blog.domain.com/page.htm&#8221;.</p>
<p>Thanks anyway.</p>
<p>Phil.</p>
<p>Regarding &#8220;Minimal Match&#8221; or aka &#8220;Lazy Match&#8221; rather than Greedy Match. Maybe some more examples would be useful e.g.</p>
<p>match first instance of &#8220;&amp;&#8221;<br />
\?paramId=(.+?)&amp;</p>
<p>match anything before the first instance of &#8220;&amp;&#8221;<br />
\?paramId=([^&amp;]+?)<br />
same as \?paramId=([^&amp;]+)&amp;</p>
<p>match 2 to 4 characters  (more efficient method for GA import engine, but no difference in result).<br />
\?paramId=(.{2,4}?)<br />
Ref:<a href="http://www.regular-expressions.info/reference.html" rel="nofollow">http://www.regular-expressions.info/reference.html</a> (link include some RegEx not support by GA RegEx)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robbin</title>
		<link>http://www.lunametrics.com/blog/2007/06/25/regular-expressions-for-ga-bonus-1-braces/comment-page-1/#comment-1820</link>
		<dc:creator>Robbin</dc:creator>
		<pubDate>Mon, 10 May 2010 13:51:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.lunametrics.com/blog/2007/06/25/regular-expressions-for-ga-bonus-1-braces/#comment-1820</guid>
		<description>Good catch!  I never saw that first typo. The second one, {2,2} vs {2}, you should be able to do either way, but you are right that just a single number is more elegant.

WRT your regex, I have never seen a referring site come through with https or http://  so making it mandatory with the beginning caret^ is going to mess you up. I hope that is the advice you were looking for.</description>
		<content:encoded><![CDATA[<p>Good catch!  I never saw that first typo. The second one, {2,2} vs {2}, you should be able to do either way, but you are right that just a single number is more elegant.</p>
<p>WRT your regex, I have never seen a referring site come through with https or http://  so making it mandatory with the beginning caret^ is going to mess you up. I hope that is the advice you were looking for.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RegEx Jedi Master</title>
		<link>http://www.lunametrics.com/blog/2007/06/25/regular-expressions-for-ga-bonus-1-braces/comment-page-1/#comment-1819</link>
		<dc:creator>RegEx Jedi Master</dc:creator>
		<pubDate>Sun, 09 May 2010 19:06:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.lunametrics.com/blog/2007/06/25/regular-expressions-for-ga-bonus-1-braces/#comment-1819</guid>
		<description>@Robin

This post has errors...

* &quot;1-3 to &quot;1,3&quot;
e.g. [0-9]{1-3}  to [0-9]{1,3}

* .{2,2} to .{2}
e.g. baza{2,2}r  to  baza{2}r

* 0 to 999 would be [0-9]{1,3}
e.g. 0 to 255 try [0-2][0-5]{2} but this would Not match &quot;166&quot;, so a better expression would be...
^([0-9]&#124;[1-9][0-9]&#124;1([0-9][0-9])&#124;2([0-4][0-9]&#124;5[0-5]))$
http://www.google.co.uk/support/googleanalytics/bin/answer.py?answer=55572

Thanks

Phil.

Also interested to here you thought on this expression...

Referral ^https?://www\.google\.(.{2,7})/([?#]hl=&#124;search&#124;webhp&#124;url).*[?#&amp;]cd=([1-9]&#124;[1-9][0-9]).*&amp;q=([^&amp;]+)&amp;(?!oi=(spell&#124;revisions_inline&#124;broad-revision&#124;social_search&#124;blog_result&#124;microblog_result&#124;sideways_refinements))

Good luck ;-)</description>
		<content:encoded><![CDATA[<p>@Robin</p>
<p>This post has errors&#8230;</p>
<p>* &#8220;1-3 to &#8220;1,3&#8243;<br />
e.g. [0-9]{1-3}  to [0-9]{1,3}</p>
<p>* .{2,2} to .{2}<br />
e.g. baza{2,2}r  to  baza{2}r</p>
<p>* 0 to 999 would be [0-9]{1,3}<br />
e.g. 0 to 255 try [0-2][0-5]{2} but this would Not match &#8220;166&#8243;, so a better expression would be&#8230;<br />
^([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))$<br />
<a href="http://www.google.co.uk/support/googleanalytics/bin/answer.py?answer=55572" rel="nofollow">http://www.google.co.uk/support/googleanalytics/bin/answer.py?answer=55572</a></p>
<p>Thanks</p>
<p>Phil.</p>
<p>Also interested to here you thought on this expression&#8230;</p>
<p>Referral ^https?://www\.google\.(.{2,7})/([?#]hl=|search|webhp|url).*[?#&amp;]cd=([1-9]|[1-9][0-9]).*&amp;q=([^&amp;]+)&amp;(?!oi=(spell|revisions_inline|broad-revision|social_search|blog_result|microblog_result|sideways_refinements))</p>
<p>Good luck <img src='http://www.lunametrics.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robbin</title>
		<link>http://www.lunametrics.com/blog/2007/06/25/regular-expressions-for-ga-bonus-1-braces/comment-page-1/#comment-691</link>
		<dc:creator>Robbin</dc:creator>
		<pubDate>Tue, 29 Jul 2008 02:03:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.lunametrics.com/blog/2007/06/25/regular-expressions-for-ga-bonus-1-braces/#comment-691</guid>
		<description>Hi Chewy.
Try this post:
http://www.lunametrics.com/blog/2007/08/08/regular-expressions-for-ga-bonus-iii-lookahead/

.... and then tell me what you think. Look especially at the negative lookahead that Alan wrote about in the comments to that post.

Robbin</description>
		<content:encoded><![CDATA[<p>Hi Chewy.<br />
Try this post:<br />
<a href="http://www.lunametrics.com/blog/2007/08/08/regular-expressions-for-ga-bonus-iii-lookahead/" rel="nofollow">http://www.lunametrics.com/blog/2007/08/08/regular-expressions-for-ga-bonus-iii-lookahead/</a></p>
<p>&#8230;. and then tell me what you think. Look especially at the negative lookahead that Alan wrote about in the comments to that post.</p>
<p>Robbin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chewy</title>
		<link>http://www.lunametrics.com/blog/2007/06/25/regular-expressions-for-ga-bonus-1-braces/comment-page-1/#comment-690</link>
		<dc:creator>Chewy</dc:creator>
		<pubDate>Tue, 29 Jul 2008 00:44:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.lunametrics.com/blog/2007/06/25/regular-expressions-for-ga-bonus-1-braces/#comment-690</guid>
		<description>so so this green newbie wants to know how would I match &quot;fish&quot; but not &quot;fishing&quot; or &quot;box&quot; but not &quot;boxes&quot;?</description>
		<content:encoded><![CDATA[<p>so so this green newbie wants to know how would I match &#8220;fish&#8221; but not &#8220;fishing&#8221; or &#8220;box&#8221; but not &#8220;boxes&#8221;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vinny</title>
		<link>http://www.lunametrics.com/blog/2007/06/25/regular-expressions-for-ga-bonus-1-braces/comment-page-1/#comment-689</link>
		<dc:creator>Vinny</dc:creator>
		<pubDate>Sun, 29 Jul 2007 21:55:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.lunametrics.com/blog/2007/06/25/regular-expressions-for-ga-bonus-1-braces/#comment-689</guid>
		<description>Wow, as someone new to GA, your articles on custom filters have been a real eye-opener for me.

You are probably aware of this, but I thought I would point you out to a great regular expression tool that I use in all my development efforts (I am a web application developer by trade).  It&#039;s called &quot;The Regex Coach&quot; and can be downloaded at http://weitz.de/regex-coach/

It allows you to enter your regular expression in the &quot;Regular expression&quot; pane, and then test it across different strings that you enter into the &quot;Target string&quot; pane.

(note: Javascript regular expressions don&#039;t play nice with usual regexp conventions.  So if you have a bit of regexp operating great in The Regex Coach it will 99% likely work in your PHP/Perl/C++/etc code, but test thoroughly within your Javascript code).</description>
		<content:encoded><![CDATA[<p>Wow, as someone new to GA, your articles on custom filters have been a real eye-opener for me.</p>
<p>You are probably aware of this, but I thought I would point you out to a great regular expression tool that I use in all my development efforts (I am a web application developer by trade).  It&#8217;s called &#8220;The Regex Coach&#8221; and can be downloaded at <a href="http://weitz.de/regex-coach/" rel="nofollow">http://weitz.de/regex-coach/</a></p>
<p>It allows you to enter your regular expression in the &#8220;Regular expression&#8221; pane, and then test it across different strings that you enter into the &#8220;Target string&#8221; pane.</p>
<p>(note: Javascript regular expressions don&#8217;t play nice with usual regexp conventions.  So if you have a bit of regexp operating great in The Regex Coach it will 99% likely work in your PHP/Perl/C++/etc code, but test thoroughly within your Javascript code).</p>
]]></content:encoded>
	</item>
</channel>
</rss>

