Just in case someone has the need to build a regular expression, there is a great utility application called Expresso and it's free. It helped me help myself and the regular expression that returns the key / value pairs in my text below is:
(?<Keyword>\w+)\s*=\s*(?<Value>.*)((?=\W$)|\z) Thanks for those who tried to help... Scott Carullo Technical Operations 877-804-3001 x102 ---------------------------------------- From: "Philip Dorr" <[email protected]> Sent: Tuesday, September 14, 2010 12:18 PM To: "WISPA General List" <[email protected]> Subject: Re: [WISPA] Off Topic Challenge (Regular Expression) to remove trailing [[x add a sed regex cat test | awk -F "=" '{print $2}'|sed 's/\[\[x//' On Tue, Sep 14, 2010 at 11:10 AM, Charles N Wyble <[email protected]> wrote: > 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/ > ---------------------------------------------------------------------------- ---- 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/
-------------------------------------------------------------------------------- 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/
