<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:10pt"><DIV><FONT face="arial, helvetica, sans-serif">Hello everyone,</FONT></DIV>
<DIV style="FONT-FAMILY: arial, helvetica, sans-serif; FONT-SIZE: 10pt">
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">
<DIV style="FONT-FAMILY: Courier New, courier, monaco, monospace, sans-serif; FONT-SIZE: 10pt">
<DIV><FONT face="arial, helvetica, sans-serif"></FONT>&nbsp;</DIV>
<DIV><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"><FONT face="arial, helvetica, sans-serif">I am trying to&nbsp;isolate numbers from string, manipulate the numbers then put them back to original positions in the string. When I try to use zero-width separator, the split function looks weird, it generated&nbsp;much more elements than I expect.</FONT></SPAN></DIV>
<DIV><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"><FONT face="arial, helvetica, sans-serif"></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"><FONT face="arial, helvetica, sans-serif">Are&nbsp;there any mistakes? Why the split behaviors like this? (The regexp&nbsp;looks right when I use it with s///)</FONT></SPAN></DIV>
<DIV><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"><FONT face=Arial></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"><FONT face=Arial>Could anyone help?</FONT></SPAN></DIV>
<DIV><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"><FONT face=Arial></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"><FONT face=Arial>Thanks,</FONT></SPAN></DIV>
<DIV><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"><FONT face=Arial>Tiger</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV>#build the seperator</DIV>
<DIV>:-) perl -le '$a = "15678.91 ml; r45.12 ";</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $a =~ s/((?!(\d|\.))(?&lt;=(\d|\.)))|((?=(\d|\.))(?&lt;!(\d|\.)))/|/g;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print $a'<BR>|15678.91| ml; r|45.12|</DIV>
<DIV>&nbsp;</DIV>
<DIV>#use the seperator in split</DIV>
<DIV>:-) perl -MData::Dumper -le '$a = "15678.91 ml; r45.12 ";</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @a = split /((?!(\d|\.))(?&lt;=(\d|\.)))|((?=(\d|\.))(?&lt;!(\d|\.)))/, $a;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print Dumper(@a)'<BR>$VAR1 = '15678.91';<BR>$VAR2 = '';<BR>$VAR3 = undef;<BR>$VAR4 = '1';<BR>$VAR5 = undef;<BR>$VAR6 = undef;<BR>$VAR7 = undef;<BR>$VAR8 = ' ml; r';<BR>$VAR9 = undef;<BR>$VAR10 = undef;<BR>$VAR11 = undef;<BR>$VAR12 = '';<BR>$VAR13 = '4';<BR>$VAR14 = undef;<BR>$VAR15 = '45.12';<BR>$VAR16 = '';<BR>$VAR17 = undef;<BR>$VAR18 = '2';<BR>$VAR19 = undef;<BR>$VAR20 = undef;<BR>$VAR21 = undef;<BR>$VAR22 = ' ';<BR></DIV></DIV></DIV></DIV></div></body></html>