<?xml version="1.0" encoding="windows-1252"?>
<node id="911357" title="Re: Using Look-ahead and Look-behind" created="2011-06-25 03:49:04" updated="2011-06-25 03:49:04">
<type id="11">
note</type>
<author id="961">
Anonymous Monk</author>
<data>
<field name="doctext">
The following is just not working. Basically, i want to match a value that has "equity",but NOT "private equity". The result must be items 1, 2, 4, 5. Please check this out:

&lt;code&gt;
my %hash = (
	1		=&gt; 'equity, private equity',
	2		=&gt; 'equity',
	3		=&gt; 'private equity',
	4		=&gt; 'private equity,equity',
	5		=&gt; 'private equity, equity',
	6		=&gt; 'equity,private equity',
	7		=&gt; 'private equity',
	8		=&gt; 'mutual funds',
	9		=&gt; 'cds'
);

while (my ($k, $v) = each %hash) {
	next unless $v =~ m/(?!private\s+)equity/;
	printf("%d -&gt; %s\n", $k, $v);
}

&lt;/code&gt;</field>
<field name="root_node">
518444</field>
<field name="parent_node">
518444</field>
<field name="reputation">
2</field>
</data>
</node>
