extract the data from buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

I want to extract variables values from a string buffer. Can anyone
pleease tell me how can i do that.
In C how to use perl like regular expressions.


Channel              Location             State   Application(Data)
SIP/5078-099b4b48    s@newvcci:1          Ringing AppQueue((Outgoing Line))
SIP/66.119.60.21-099 s@tracphone:6        Up      Queue(tracphone||||3600)
SIP/5080-09964168    s@newvcci:1          Up      Bridged Call(SIP/66.119.60.21-
SIP/66.119.60.21-099 s@tracphone:6        Up      Queue(tracphone||||3600)
SIP/5079-09924998    s@newvcci:1          Up      Bridged Call(SIP/66.119.60.21-
SIP/66.119.60.21-099 s@tracphone:6        Up      Queue(tracphone||||3600)
SIP/5041-0993ee38    s@newvcci:1          Up      Bridged Call(SIP/66.119.60.21-
SIP/66.119.60.21-099 s@tracphone:6        Up      Queue(tracphone||||3600)
SIP/5010-098e7760    tsihomephoneservice@ Up      Bridged Call(SIP/63.111.11.135
SIP/63.111.11.135-09 tsihomephoneservice@ Up      Queue(tsihomephoneservice||||9
10 active channels
5 of 200 max active calls ( 2.50% of capacity)


I want to extract three numeric data fields from last line:
as

%d of %d max active calls ( %l% of capacity)
result : 5,200,2.50

means 2.5


Thanks and Regards

Jai
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Assembler]     [Git]     [Kernel List]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [C Programming]     [Yosemite Campsites]     [Yosemite News]     [GCC Help]

  Powered by Linux