Hello Philip,

Thanks for the response.  I'm not running linux, the regular expression is 
in a .NET custom app I am writing that receives the text below from a 
remote web request.  I need just a raw regular expression that pulls out 
each chunk.

Kind of like this    <TAG\b[^>]*>(.*?)</TAG>
will grab whats between html tags, I need to grab a section (each piece I 
need with its own regex) at a time from the string.  It is complicated but 
I know it can be done, regular expressions are very powerful but 
challenging.  Thanks again.

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/

Reply via email to