I have a Variable with a string (from a TCP/IP port) roughly 600 characters long. The string is actually a data transmission packet which is seperated into SEGMENTS and FIELDS
Each SEGMENT is preceeded by a (Hex 1E). Within the Segment there are FIELD Identifiers preceeded by (Hex 1C), then the Field ID, then Data.
For Example:
$MyCapturedString="(Hex 1E)AM01(Hex 1C)A1123456(Hex 1C)C420050101";
Where AM, A1, and C4 are Field Identifiers, and 01, 123456, and 20050101 is data for those fields.
The problem is that there are many possible fields (400+) and most times only Some of those fields are transmitted to the string. (It's a variable format).
Any ideas on the best method to parse the string into:
$AM=01, $a!=123456, $C4=20050101