Link to home
Start Free TrialLog in
Avatar of codejunky
codejunky

asked on

Parsing Socket Data STX ETX

what is the best way to parse inforamtion coming in through a socket. The data looks like this
<STX>
some data
<ETX>
1byte(checksum)
<STX>
some data
<ETX>
1byte(checksum)

I was thinking of using a regular expression, but the expression \x02(.*)\x03 could give me 1 match instead of breaking them into 2 matches when using the example above. Does anyone know how the proper regular expression would be written?

Thanks in advance
ASKER CERTIFIED SOLUTION
Avatar of codejunky
codejunky

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial