<?xml version="1.0" encoding="windows-1252"?>
<node id="911824" title="Re: How to substitute something from only between two specified charecters" created="2011-06-28 14:15:24" updated="2011-06-28 14:15:24">
<type id="11">
note</type>
<author id="580841">
wind</author>
<data>
<field name="doctext">
&lt;p&gt;Just rely on the fact that the second item is the only one that allows spacing:&lt;/p&gt;

&lt;c&gt;
use strict;
use warnings;

while (&lt;DATA&gt;) {
	if (/^(\S+)\s+(.*\S)\s+(\S+)\s+(\S+)$/) {
		print "A:B = $1\n";
		print "C/D/E/F = $2\n";
		print "G/H/I = $3\n";
		print "J = $4\n";
	} else {
		warn "Invalid record: $_";
	}
}

__DATA__
&gt;cds:ADD75048 A/Brussels/INS71/2009 2009/10/30 HA
&gt;cds:ADF58353 A/Germany-MV/HGW4/2009 2009/12/ HA
&gt;cds:ADF58351 A/Germany-MV/HGW6/2009 2009/12/ HA
&gt;cds:ADU76781 A/England/94780010/2009 2009/10/22 HA
&gt;cds:AEA30293 A/Netherlands/2223b/2009 2009/11/18 HA
&gt;cds:ADD23250 A/District of Columbia/INS17/2009 2009/10/26 HA
&gt;cds:ADX98640 A/San Diego/INS13/2009 2009/10/19 HA
&gt;cds:ADD74978 A/San Diego/INS54/2009 2009/10/12 HA
&gt;cds:ADF27925 A/Texas/JMS407/2010 2010/01/11 HA
&gt;cds:ADM95824 A/Finland/661/2009 2009/10/26 HA
&gt;cds:ADD97035 A/Wisconsin/629-D00036/2009 2009/09/15 HA
&lt;/c&gt;</field>
<field name="root_node">
911807</field>
<field name="parent_node">
911807</field>
</data>
</node>
