Re: string splitting



On Tue, 29 Apr 2008 03:55:09 -0700 (PDT), xyz
<lavanyareddy.p@xxxxxxxxx> wrote:

I have a string
16:23:18.659343 131.188.37.230.22 131.188.37.59.1398 tcp 168

for example lets say for the above string
16:23:18.659343 -- time
131.188.37.230 -- srcaddress
22 --srcport
131.188.37.59 --destaddress
1398 --destport
tcp --protocol
168 --size
i need to split this string such that i need to get all these
parameters....the filed widths are not fixed...some time i have 4/3
digits srcport

Can you not split on the spaces? Whatever programming language you are
using may even have a split function.


--
Regards, Paul Herber, Sandrila Ltd.
http://www.sdl.sandrila.co.uk/ SDL/MSC/TTCN/URN/UML2 for Visio
.



Relevant Pages

  • Re: string splitting plzzzzzz help me...
    ...   -- srcaddress ... i need to split the string such that i need to get all these ... srcport ..so i cant do it with substr function...i need this in c++ ...
    (comp.lang.c)
  • Re: string splitting plzzzzzz help me...
    ... -- srcaddress ... i need to split the string such that i need to get all these ... splitted tokens are ipv4 addresses and ... basics before you start writing networking code. ...
    (comp.lang.c)
  • Re: string splitting plzzzzzz help me...
    ... -- srcaddress ... i need to split the string such that i need to get all these ... going to increase the level of response by being obnoxious. ... Ask us to do the work for you and suffer in silence. ...
    (comp.lang.c)
  • Re: string splitting plzzzzzz help me...
    ...   -- srcaddress ... i need to split the string such that i need to get all these ... Nick Keighley ...
    (comp.lang.c)
  • Re: string splitting plzzzzzz help me...
    ...   -- srcaddress ... i need to split the string such that i need to get all these ... the clue is '.' ...
    (comp.lang.c)