<?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"
	>
<channel>
	<title>Comments on: Regular Expressions Part XII: Now Let&#8217;s Practice</title>
	<atom:link href="http://www.lunametrics.com/blog/2006/11/27/regular-expressions-part-xii-now-lets-practice/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lunametrics.com/blog/2006/11/27/regular-expressions-part-xii-now-lets-practice/</link>
	<description>LunaMetric's blog on conversion rate and web analytics</description>
	<pubDate>Sun, 12 Oct 2008 10:01:38 +0000</pubDate>
	<generator>http://wordpress.org/</generator>
		<item>
		<title>By: Robbin</title>
		<link>http://www.lunametrics.com/blog/2006/11/27/regular-expressions-part-xii-now-lets-practice/#comment-2014</link>
		<dc:creator>Robbin</dc:creator>
		<pubDate>Fri, 08 Aug 2008 15:24:36 +0000</pubDate>
		<guid isPermaLink="false">http://72.22.16.69/blog/?p=265#comment-2014</guid>
		<description>J. Naveen --

Why don't you try 

set(?!.*get)

That says, match the expression if it includes &lt;b&gt;set&lt;/b&gt;, as long as it is not followed somewhere down the line by &lt;b&gt;get&lt;/b&gt;.  You can make it more specific if you need to, but that would be the guts of the negative match.</description>
		<content:encoded><![CDATA[<p>J. Naveen &#8211;</p>
<p>Why don&#8217;t you try </p>
<p>set(?!.*get)</p>
<p>That says, match the expression if it includes <b>set</b>, as long as it is not followed somewhere down the line by <b>get</b>.  You can make it more specific if you need to, but that would be the guts of the negative match.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: J.Naveen</title>
		<link>http://www.lunametrics.com/blog/2006/11/27/regular-expressions-part-xii-now-lets-practice/#comment-2002</link>
		<dc:creator>J.Naveen</dc:creator>
		<pubDate>Thu, 07 Aug 2008 07:20:09 +0000</pubDate>
		<guid isPermaLink="false">http://72.22.16.69/blog/?p=265#comment-2002</guid>
		<description>Hi, this is very interesting tutorial, it is very helpful for the beginners. I saw that negative look ahead example (?!misc). I have a doubt in that example. I practiced with another example but I am not getting positive result So please help me for this expression

Ex: I have data like this....

            1. tf_PADD1.setText(tf_ADD1.getText());
            2. tf_PADD2.setText(tf_ADD2.setText());
            3. tf_PCITY.setText(tf_CITY.getText());
            4. cm_PDISTRICT.setSelectedItem(cm_DISTRICT.getSelectedItem());
            5. tf_PPINCODE.setText(tf_PINCODE.setText());  

in that above text I want to select lines which do not have the combination of setText and GetText(Targeted result 2&#38;5 lines), for that I wrote an expression but that expression selects 1,2,3,5 line in that above text. First I thought I got understand this concept now I am in confusion, exactly what is the use of negativeahead(?!....) 
I thought This expression is for not negating a word, So if it selects 1st word before getText then wht is the use?

My Expression is:
    (?!getText)tf_.*setText

I am learning, how to negate a word.
So please help me, I am very eager to know where I am doing worng..............</description>
		<content:encoded><![CDATA[<p>Hi, this is very interesting tutorial, it is very helpful for the beginners. I saw that negative look ahead example (?!misc). I have a doubt in that example. I practiced with another example but I am not getting positive result So please help me for this expression</p>
<p>Ex: I have data like this&#8230;.</p>
<p>            1. tf_PADD1.setText(tf_ADD1.getText());<br />
            2. tf_PADD2.setText(tf_ADD2.setText());<br />
            3. tf_PCITY.setText(tf_CITY.getText());<br />
            4. cm_PDISTRICT.setSelectedItem(cm_DISTRICT.getSelectedItem());<br />
            5. tf_PPINCODE.setText(tf_PINCODE.setText());  </p>
<p>in that above text I want to select lines which do not have the combination of setText and GetText(Targeted result 2&amp;5 lines), for that I wrote an expression but that expression selects 1,2,3,5 line in that above text. First I thought I got understand this concept now I am in confusion, exactly what is the use of negativeahead(?!&#8230;.)<br />
I thought This expression is for not negating a word, So if it selects 1st word before getText then wht is the use?</p>
<p>My Expression is:<br />
    (?!getText)tf_.*setText</p>
<p>I am learning, how to negate a word.<br />
So please help me, I am very eager to know where I am doing worng&#8230;&#8230;&#8230;&#8230;..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robbin</title>
		<link>http://www.lunametrics.com/blog/2006/11/27/regular-expressions-part-xii-now-lets-practice/#comment-1271</link>
		<dc:creator>Robbin</dc:creator>
		<pubDate>Wed, 19 Mar 2008 10:50:23 +0000</pubDate>
		<guid isPermaLink="false">http://72.22.16.69/blog/?p=265#comment-1271</guid>
		<description>Thanks. If you click on all the pictures of the regular expressions in the google online explanation, you'll find that we (just) wrote the backup explanations there. So that is getting better, too.  Plus, I think G is trying much much harder to do better doc work....</description>
		<content:encoded><![CDATA[<p>Thanks. If you click on all the pictures of the regular expressions in the google online explanation, you&#8217;ll find that we (just) wrote the backup explanations there. So that is getting better, too.  Plus, I think G is trying much much harder to do better doc work&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: schemogroby</title>
		<link>http://www.lunametrics.com/blog/2006/11/27/regular-expressions-part-xii-now-lets-practice/#comment-1270</link>
		<dc:creator>schemogroby</dc:creator>
		<pubDate>Wed, 19 Mar 2008 08:49:47 +0000</pubDate>
		<guid isPermaLink="false">http://72.22.16.69/blog/?p=265#comment-1270</guid>
		<description>Nice Examples. Much more practical/understandable than the official google online "explanation". Thanks for sharing!</description>
		<content:encoded><![CDATA[<p>Nice Examples. Much more practical/understandable than the official google online &#8220;explanation&#8221;. Thanks for sharing!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Renato</title>
		<link>http://www.lunametrics.com/blog/2006/11/27/regular-expressions-part-xii-now-lets-practice/#comment-1191</link>
		<dc:creator>Renato</dc:creator>
		<pubDate>Fri, 15 Feb 2008 17:58:23 +0000</pubDate>
		<guid isPermaLink="false">http://72.22.16.69/blog/?p=265#comment-1191</guid>
		<description>My website uses PHP on a framework called Zend Framework witch make my url parameters look like subdirectories. My url looks like www.mysite.com/section/module/page/paratemer1/value1/parameter2/value2/ instead of www.mysite.com/section/module/page.php?paratemer1=value1&#38;parameter2=value2. My problem is that Urchin is considering that my parameters are subdirectories and the reports are not usefull because I can't know my most access pages and other reports.

Do you know how can I resolve this in order to Urchin consider just the 4 first directories and sum the rests? For example, in this case, I would like Urchin to consider every access to after 4 sub-directories:www.mysite.com.br/section/module/page/pagename to a pageview of the pagename.</description>
		<content:encoded><![CDATA[<p>My website uses PHP on a framework called Zend Framework witch make my url parameters look like subdirectories. My url looks like <a href="http://www.mysite.com/section/module/page/paratemer1/value1/parameter2/value2/" rel="nofollow">http://www.mysite.com/section/module/page/paratemer1/value1/parameter2/value2/</a> instead of <a href="http://www.mysite.com/section/module/page.php?paratemer1=value1&amp;parameter2=value2" rel="nofollow">http://www.mysite.com/section/module/page.php?paratemer1=value1&amp;parameter2=value2</a>. My problem is that Urchin is considering that my parameters are subdirectories and the reports are not usefull because I can&#8217;t know my most access pages and other reports.</p>
<p>Do you know how can I resolve this in order to Urchin consider just the 4 first directories and sum the rests? For example, in this case, I would like Urchin to consider every access to after 4 sub-directories:www.mysite.com.br/section/module/page/pagename to a pageview of the pagename.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Des</title>
		<link>http://www.lunametrics.com/blog/2006/11/27/regular-expressions-part-xii-now-lets-practice/#comment-697</link>
		<dc:creator>Des</dc:creator>
		<pubDate>Tue, 24 Jul 2007 16:35:06 +0000</pubDate>
		<guid isPermaLink="false">http://72.22.16.69/blog/?p=265#comment-697</guid>
		<description>Hi Steve,
Thanks for your solution. I've tested it by using it to search content in G.A, and it works. 

I had presumed that you can concatenate letters inside the square brackets for form strings. Clearly not, here is a case where I mourn the lack of programmers manual. (I've used reg exs before in perl, documentation is a tad richer etc). 

Anyways, many thanks, 

Des</description>
		<content:encoded><![CDATA[<p>Hi Steve,<br />
Thanks for your solution. I&#8217;ve tested it by using it to search content in G.A, and it works. </p>
<p>I had presumed that you can concatenate letters inside the square brackets for form strings. Clearly not, here is a case where I mourn the lack of programmers manual. (I&#8217;ve used reg exs before in perl, documentation is a tad richer etc). </p>
<p>Anyways, many thanks, </p>
<p>Des</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve</title>
		<link>http://www.lunametrics.com/blog/2006/11/27/regular-expressions-part-xii-now-lets-practice/#comment-696</link>
		<dc:creator>steve</dc:creator>
		<pubDate>Tue, 24 Jul 2007 05:23:47 +0000</pubDate>
		<guid isPermaLink="false">http://72.22.16.69/blog/?p=265#comment-696</guid>
		<description>Hi Des,

Tricky. Very tricky. In that it requires use of an advanced RegEx that most people really don't need, use or understand. :-)

1st off: view\.php\?type=[^(misc)]
won't do what you want. The use of the square brackets is for a grouping of characters in any order.
ie your RegEx will match anything without the letters 'i' or 's' or 'c' or 'm' or ')' or '(' as the first character after the "type=".
eg. view.php?type=) or ...type=m and so on. Being the ones that won't match.

The Quick answer is:

view\.php\?type=(?!misc)

BUT!!!! And it's a big but. I have no idea if GA can actually understand that construct ("negative lookahead" if you're interested).
Suggest creating a test profile, use that as the only filter and see if you can make it trip or not by hitting your website.

In essence, this says we have a successful match if we DON'T have a 'misc' following the "...type="
The use of brackets is... special/different in this situation. Be. Ware. :-)

Robbin, if you want to chase me on this, I can take you through in more detail. But, I almost *never* use this construct. It's useful, but can be very confusing to use.
Cheers!</description>
		<content:encoded><![CDATA[<p>Hi Des,</p>
<p>Tricky. Very tricky. In that it requires use of an advanced RegEx that most people really don&#8217;t need, use or understand. <img src='http://www.lunametrics.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>1st off: view\.php\?type=[^(misc)]<br />
won&#8217;t do what you want. The use of the square brackets is for a grouping of characters in any order.<br />
ie your RegEx will match anything without the letters &#8216;i&#8217; or &#8217;s&#8217; or &#8216;c&#8217; or &#8216;m&#8217; or &#8216;)&#8217; or &#8216;(&#8217; as the first character after the &#8220;type=&#8221;.<br />
eg. view.php?type=) or &#8230;type=m and so on. Being the ones that won&#8217;t match.</p>
<p>The Quick answer is:</p>
<p>view\.php\?type=(?!misc)</p>
<p>BUT!!!! And it&#8217;s a big but. I have no idea if GA can actually understand that construct (&#8221;negative lookahead&#8221; if you&#8217;re interested).<br />
Suggest creating a test profile, use that as the only filter and see if you can make it trip or not by hitting your website.</p>
<p>In essence, this says we have a successful match if we DON&#8217;T have a &#8216;misc&#8217; following the &#8220;&#8230;type=&#8221;<br />
The use of brackets is&#8230; special/different in this situation. Be. Ware. <img src='http://www.lunametrics.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Robbin, if you want to chase me on this, I can take you through in more detail. But, I almost *never* use this construct. It&#8217;s useful, but can be very confusing to use.<br />
Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Des</title>
		<link>http://www.lunametrics.com/blog/2006/11/27/regular-expressions-part-xii-now-lets-practice/#comment-694</link>
		<dc:creator>Des</dc:creator>
		<pubDate>Mon, 23 Jul 2007 11:08:33 +0000</pubDate>
		<guid isPermaLink="false">http://72.22.16.69/blog/?p=265#comment-694</guid>
		<description>Hi Robbin, 
I was looking for a "not" operator for quite a while, I had worked it out by trial and error and then found this. Can you tell me this much... 
would 

view\.php\?type=[^(misc)]

Match all urls of the form view.php?type=Anything, except for this one...
view.php?type=misc

This is a great series of posts by the way, thanks for it

Des</description>
		<content:encoded><![CDATA[<p>Hi Robbin,<br />
I was looking for a &#8220;not&#8221; operator for quite a while, I had worked it out by trial and error and then found this. Can you tell me this much&#8230;<br />
would </p>
<p>view\.php\?type=[^(misc)]</p>
<p>Match all urls of the form view.php?type=Anything, except for this one&#8230;<br />
view.php?type=misc</p>
<p>This is a great series of posts by the way, thanks for it</p>
<p>Des</p>
]]></content:encoded>
	</item>
</channel>
</rss>
