On 9/14/2010 8:57 AM, Scott Carullo wrote:
I receive the following back from a web request a custom application makes. I need some regular expressions that tear it apart into its individual data fields. Everything between the equal lines is an actual response sample. I need the name, number, address, city, state and zip pulled from the entire text output - each with one regular expression. I'm sure there is some talented people out there that can do this in a few minutes. I figured I'd be lazy and ask before I spent hours trial and erroring.

 Thanks for your assistance and time....

============================
Vitelity Communications API. Unauthorized access prohibited. All commands are logged along with IP and username.

x[[name=BREVARD WIRELESS
number=3212051100
address=123 WIRELESS DR
city=ROCKLEDGE
state=FL
zip=32955[[x
If it's on Linux just shell out to awk via a system call and assign each response to a variable (probably inside an array):

char...@john:~$ cat testin2
[name=blah
number=111111
address=1 a b c

char...@john:~$ cat testin2 | awk -F "=" '{print $2}'
blah
111111
1 a b c


:)



--------------------------------------------------------------------------------
WISPA Wants You! Join today!
http://signup.wispa.org/
--------------------------------------------------------------------------------
 
WISPA Wireless List: [email protected]

Subscribe/Unsubscribe:
http://lists.wispa.org/mailman/listinfo/wireless

Archives: http://lists.wispa.org/pipermail/wireless/

Reply via email to