Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Gather info repeated 'N' times
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
cccwebs  
View profile  
 More options Jun 12, 11:14 am
From: cccwebs <scott.whitt...@gmail.com>
Date: Fri, 12 Jun 2009 08:14:05 -0700 (PDT)
Local: Fri, Jun 12 2009 11:14 am
Subject: Gather info repeated 'N' times
Hello,

I am relatively new to regex.  What I am trying to do is parse a list
of info like this:

User: dwilliams
Date: 06-06-2009
Time: 12:00
Player: Dick Williams
Player: Tom Mathis
Player: Ed Davis
Player: Fred Masterson

This info is coming to me via email.  Each of the initial entries are
fixed, User, Date, and Time.  The Player entries could be any number
greater than 1.  I need to be able to pull the player info into an
array or list so that I can act on each name independently.  I can
make it pull out each piece separately but I don't know how to make it
go down the list to an indeterminate end.

Any help is appreciated!

cccwebs


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Accmailer  
View profile  
 More options Jun 22, 7:45 am
From: Accmailer <Eugeny.Satt...@gmail.com>
Date: Mon, 22 Jun 2009 04:45:14 -0700 (PDT)
Local: Mon, Jun 22 2009 7:45 am
Subject: Re: Gather info repeated 'N' times
Here is what i suggest, it is a two step solurion

ther regex is
^user:\x20([^\r\n]+)\r\ndate:\x20([^\r\n]+)\r\ntime:\x20([^\r\n]+)\r\n
((Player:\x20([^\r\n]+)\r\n)*)

sorry if the above gets broken into multiple lines :) it is not me!

apply it and collect $1,$2,$3,$4 variables

and here comes the 2nd step: delete all occurencies of "player: " and
line breaks as well from the 4th variable

And you are ready!

--
regards, Eugeny

P.S. If unclear, email me personally

On Jun 12, 8:14 pm, cccwebs <scott.whitt...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google