<?xml version="1.0" encoding="windows-1252"?>
<node id="910073" title="Re: Regex expression to match..." created="2011-06-17 00:58:11" updated="2011-06-17 00:58:11">
<type id="11">
note</type>
<author id="580841">
wind</author>
<data>
<field name="doctext">
The following will match two words in a row:

&lt;c&gt;
use strict;
use warnings;

my @strings = qw(
	/help/one/one/one/something_here
	/buy/cash/buy/water/water/water/nothing_here 	
);

for (@strings) {
	if (m{\b(\w+)/\1\b}) {
		print "Dup is '$1'\n";
	}
}
&lt;/c&gt;</field>
<field name="root_node">
910068</field>
<field name="parent_node">
910068</field>
</data>
</node>
