<?xml version="1.0" encoding="windows-1252"?>
<node id="1003421" title="Re: Regex Doubt" created="2012-11-12 06:30:54" updated="2012-11-12 06:30:54">
<type id="11">
note</type>
<author id="920017">
pvaldes</author>
<data>
<field name="doctext">
&lt;p&gt;I love to cheat (and I love to check too). Look at the last line of data&lt;/p&gt;

&lt;p&gt;/i is said yet, so its use here is intentionally omitted&lt;/p&gt;

&lt;c&gt;
use strict; use warnings;

while (&lt;DATA&gt;){
if (/([Bb]arton-[Ll]e-[Cc]lay|[Mm]ilton\s+[Kk]eynes|[Gg]lasgow|[Bb]arton-le-[cC]lay \(near [Ll]utton\))\s?$/){ print $1,"\n"}
else {print "-- what? --\n"}
}

__DATA__
Part Time - Weekend Receptionist - Barton le Clay - Barton-le-Clay (near Luton)
Part-Time Weekend Day Veterinary Nurse - Milton keynes 
Receptionist - barton-le-clay (near luton) 
Full time liar - Glasgow (Australia)
&lt;/c&gt;</field>
<field name="root_node">
1003379</field>
<field name="parent_node">
1003379</field>
</data>
</node>
