Parsing some String
Posted on 2005-03-02
I have a string like the one below and i would like to parse out the folowing info
Value of CName Response: and Presentation Indicator:
So my first thought is to find index of CName Response: and Presentation Indicator: and extract the
data from beteen the 2 indexes which will get me the CName value. On the Presentation Indicator:
i am not sure how to go about it since the value can have diffrent length and i only know after the value
comes a line break. Any ideas how to extract the value ?
Also, how can i extract only the line which contains "CName Response" in this case it is on line 7
but it could be on 8 or even 6.
2850> tteessttCCNNaammeeQQuueerryy 2125551212
Raw TCAP Component dump:
0xea 0x17 0xcf 0x01 0x00 0xf2 0x12 0x97
0x10 0x21 0x49 0x43 0x43 0x49 0x20 0x54
0x45 0x43 0x48 0x20 0x53 0x55 0x50 0x50
CName Response: Info Response , Presentation Indicator: Restricted