<?xml version="1.0" encoding="windows-1252"?>
<node id="937621" title="RegEx related line split" created="2011-11-11 12:06:28" updated="2011-11-11 12:06:28">
<type id="115">
perlquestion</type>
<author id="936231">
dominic01</author>
<data>
<field name="doctext">
&lt;p&gt;I am trying to split the following line and would like to process individual parts. &lt;/p&gt;

&lt;code&gt;
my $RefLine = "(a) This is first line. (b) This is second line; (c) This is different line 32. (d) Here is the last line.";

$RefLine =~ /^(\([a-z]\) .+ (?=\([a-z]\)))(.*?)/;

print "01\t$1\n02\t$2\n03\t$3\n";

&lt;/code&gt;

&lt;p&gt;I am not actually splitting in the above example but I am trying to make a match so that I can split individual lines. Here in my case the pattern matches "(a) .... to 32."
Not sure how to get them in an array like&lt;/p&gt;

&lt;p&gt;(a) This is first line.&lt;br/&gt;
(b) This is second line;&lt;br/&gt;
(c) This is different line 32.&lt;br/&gt;
(d) Here is the last line.&lt;br/&gt;
Appreciate any help&lt;/p&gt;
</field>
</data>
</node>
