[Denver-pm] Splitting Data

Olson, David David.Olson2 at Honeywell.com
Thu Oct 3 15:45:49 PDT 2013


Dear Robert,

My first guess would be that $String isn't really what you expect.  Try escaping the double quotes as in
$String = 'component1,component2,\"This is my, test string\", component4';

David Olson
Reliability Engineer
Reliability & Maintainability Engineering
Honeywell, Inc.


REQUIRED NOTICE: Please note that I am NOT authorized to negotiate, bind or make commitments on behalf of Honeywell Technology Solutions, Inc. (HTSI).  No email or conversation with me should be viewed as providing direction for which compensation can be expected.  Any forthcoming formal agreement will come from HTSI's Contracts and Procurement Organization.

This communication, including any attachment, contains information that may be confidential or privileged, and is intended solely for the entity or individual to whom it is addressed. If you are not the intended recipient, please notify the sender at once, and you should delete this message and are hereby notified that any disclosure, copying, or distribution of this message is strictly prohibited.




From: Denver-pm [mailto:denver-pm-bounces+david.olson2=honeywell.com at pm.org] On Behalf Of Robert L. Harris
Sent: Thursday, October 03, 2013 4:32 PM
To: Denver-pm at pm.org
Subject: [Denver-pm] Splitting Data


$String='component1,component2,"This is my, test string", component4';

($C1, $C2, $Str, $C4) = split(',', $String);

I'm only getting "This is my" in $Str and $C4 does not contain "component4".  Is there a graceful way of handling this?  It's a 1 in 10000 chance it'll break but accuracy counts.
[https://mail.google.com/mail/u/0/images/cleardot.gif]

--
:wq!
---------------------------------------------------------------------------
Robert L. Harris

DISCLAIMER:
      These are MY OPINIONS             With Dreams To Be A King,
       ALONE.  I speak for                      First One Should Be A Man
       no-one else.                                     - Manowar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/denver-pm/attachments/20131003/7d0399e4/attachment.html>


More information about the Denver-pm mailing list