Re: Extracting patterns after matching a regex

2009-09-11 Thread Mart.
On Sep 9, 4:58 pm, Al Fansome al_fans...@hotmail.com wrote: Mart. wrote: On Sep 8, 4:33 pm, MRAB pyt...@mrabarnett.plus.com wrote: Mart. wrote: On Sep 8, 3:53 pm, MRAB pyt...@mrabarnett.plus.com wrote: Mart. wrote: On Sep 8, 3:14 pm, Andreas Tawn andreas.t...@ubisoft.com wrote: Hi, I

Re: Extracting patterns after matching a regex

2009-09-09 Thread Mart.
On Sep 8, 4:33 pm, MRAB pyt...@mrabarnett.plus.com wrote: Mart. wrote: On Sep 8, 3:53 pm, MRAB pyt...@mrabarnett.plus.com wrote: Mart. wrote: On Sep 8, 3:14 pm, Andreas Tawn andreas.t...@ubisoft.com wrote: Hi, I need to extract a string after a matching a regular expression. For

Re: Extracting patterns after matching a regex

2009-09-09 Thread MRAB
Mart. wrote: On Sep 8, 4:33 pm, MRAB pyt...@mrabarnett.plus.com wrote: Mart. wrote: On Sep 8, 3:53 pm, MRAB pyt...@mrabarnett.plus.com wrote: Mart. wrote: On Sep 8, 3:14 pm, Andreas Tawn andreas.t...@ubisoft.com wrote: Hi, I need to extract a string after a matching a regular expression.

Re: Extracting patterns after matching a regex

2009-09-09 Thread Al Fansome
Mart. wrote: On Sep 8, 4:33 pm, MRAB pyt...@mrabarnett.plus.com wrote: Mart. wrote: On Sep 8, 3:53 pm, MRAB pyt...@mrabarnett.plus.com wrote: Mart. wrote: On Sep 8, 3:14 pm, Andreas Tawn andreas.t...@ubisoft.com wrote: Hi, I need to extract a string after a matching a regular expression.

Extracting patterns after matching a regex

2009-09-08 Thread Martin
Hi, I need to extract a string after a matching a regular expression. For example I have the string... s = FTPHOST: e4ftl01u.ecs.nasa.gov and once I match FTPHOST I would like to extract e4ftl01u.ecs.nasa.gov. I am not sure as to the best approach to the problem, I had been trying to match the

Re: Extracting patterns after matching a regex

2009-09-08 Thread MRAB
Martin wrote: Hi, I need to extract a string after a matching a regular expression. For example I have the string... s = FTPHOST: e4ftl01u.ecs.nasa.gov and once I match FTPHOST I would like to extract e4ftl01u.ecs.nasa.gov. I am not sure as to the best approach to the problem, I had been

Re: Extracting patterns after matching a regex

2009-09-08 Thread pdpi
On Sep 8, 1:56 pm, Martin mdeka...@gmail.com wrote: Hi, I need to extract a string after a matching a regular expression. For example I have the string... s = FTPHOST: e4ftl01u.ecs.nasa.gov and once I match FTPHOST I would like to extract e4ftl01u.ecs.nasa.gov. I am not sure as to the

Re: Extracting patterns after matching a regex

2009-09-08 Thread Mark Tolonen
Martin mdeka...@gmail.com wrote in message news:5941d8f1-27c0-47d9-8221-d21f07200...@j39g2000yqh.googlegroups.com... Hi, I need to extract a string after a matching a regular expression. For example I have the string... s = FTPHOST: e4ftl01u.ecs.nasa.gov and once I match FTPHOST I would

Re: Extracting patterns after matching a regex

2009-09-08 Thread Mart.
On Sep 8, 2:15 pm, MRAB pyt...@mrabarnett.plus.com wrote: Martin wrote: Hi, I need to extract a string after a matching a regular expression. For example I have the string... s = FTPHOST: e4ftl01u.ecs.nasa.gov and once I match FTPHOST I would like to extract e4ftl01u.ecs.nasa.gov.

Re: Extracting patterns after matching a regex

2009-09-08 Thread Mart.
On Sep 8, 2:21 pm, Mark Tolonen metolone+gm...@gmail.com wrote: Martin mdeka...@gmail.com wrote in message news:5941d8f1-27c0-47d9-8221-d21f07200...@j39g2000yqh.googlegroups.com... Hi, I need to extract a string after a matching a regular expression. For example I have the string...

Re: Extracting patterns after matching a regex

2009-09-08 Thread Mart.
On Sep 8, 2:16 pm, Andreas Tawn andreas.t...@ubisoft.com wrote: Hi, I need to extract a string after a matching a regular expression. For example I have the string... s = FTPHOST: e4ftl01u.ecs.nasa.gov and once I match FTPHOST I would like to extract e4ftl01u.ecs.nasa.gov. I am not

Re: Extracting patterns after matching a regex

2009-09-08 Thread pdpi
On Sep 8, 3:21 pm, nn prueba...@latinmail.com wrote: On Sep 8, 9:55 am, Mart. mdeka...@gmail.com wrote: On Sep 8, 2:16 pm, Andreas Tawn andreas.t...@ubisoft.com wrote: Hi, I need to extract a string after a matching a regular expression. For example I have the string...

Re: Extracting patterns after matching a regex

2009-09-08 Thread MRAB
Mart. wrote: On Sep 8, 3:14 pm, Andreas Tawn andreas.t...@ubisoft.com wrote: Hi, I need to extract a string after a matching a regular expression. For example I have the string... s = FTPHOST: e4ftl01u.ecs.nasa.gov and once I match FTPHOST I would like to extract e4ftl01u.ecs.nasa.gov. I am not

Re: Extracting patterns after matching a regex

2009-09-08 Thread Mart.
On Sep 8, 3:53 pm, MRAB pyt...@mrabarnett.plus.com wrote: Mart. wrote: On Sep 8, 3:14 pm, Andreas Tawn andreas.t...@ubisoft.com wrote: Hi, I need to extract a string after a matching a regular expression. For example I have the string... s = FTPHOST: e4ftl01u.ecs.nasa.gov and once I

RE: Extracting patterns after matching a regex

2009-09-08 Thread Andreas Tawn
Hi, I need to extract a string after a matching a regular expression. For example I have the string... s = FTPHOST: e4ftl01u.ecs.nasa.gov and once I match FTPHOST I would like to extract e4ftl01u.ecs.nasa.gov. I am not sure as to the best approach to the problem, I had

Re: Extracting patterns after matching a regex

2009-09-08 Thread Mart.
On Sep 8, 3:14 pm, Andreas Tawn andreas.t...@ubisoft.com wrote: Hi, I need to extract a string after a matching a regular expression. For example I have the string... s = FTPHOST: e4ftl01u.ecs.nasa.gov and once I match FTPHOST I would like to extract

Re: Re: Extracting patterns after matching a regex

2009-09-08 Thread Dave Angel
Mart. wrote: snip I have been doing this to turn the email into a string email =ys.argv[1] f =open(email, 'r') s =str(f.readlines()) so FTPHOST isn't the first element, it is just part of a larger string. When I turn the email into a string it looks like... 'FINISHED: 09/07/2009

Re: Extracting patterns after matching a regex

2009-09-08 Thread Terry Reedy
Mart. wrote: On Sep 8, 2:15 pm, MRAB pyt...@mrabarnett.plus.com wrote: Martin wrote: Hi, I need to extract a string after a matching a regular expression. Whether or not you need re is an issue to be determined. For example I have the string... s = FTPHOST: e4ftl01u.ecs.nasa.gov and once

Re: Extracting patterns after matching a regex

2009-09-08 Thread nn
On Sep 8, 9:55 am, Mart. mdeka...@gmail.com wrote: On Sep 8, 2:16 pm, Andreas Tawn andreas.t...@ubisoft.com wrote: Hi, I need to extract a string after a matching a regular expression. For example I have the string... s = FTPHOST: e4ftl01u.ecs.nasa.gov and once I match

RE: Extracting patterns after matching a regex

2009-09-08 Thread Andreas Tawn
Hi, I need to extract a string after a matching a regular expression. For example I have the string... s = FTPHOST: e4ftl01u.ecs.nasa.gov and once I match FTPHOST I would like to extract e4ftl01u.ecs.nasa.gov. I am not sure as to the best approach to the problem, I had been trying to

Re: Extracting patterns after matching a regex

2009-09-08 Thread MRAB
Mart. wrote: On Sep 8, 3:53 pm, MRAB pyt...@mrabarnett.plus.com wrote: Mart. wrote: On Sep 8, 3:14 pm, Andreas Tawn andreas.t...@ubisoft.com wrote: Hi, I need to extract a string after a matching a regular expression. For example I have the string... s = FTPHOST: e4ftl01u.ecs.nasa.gov and

Re: Extracting patterns after matching a regex

2009-09-08 Thread nn
On Sep 8, 10:27 am, pdpi pdpinhe...@gmail.com wrote: On Sep 8, 3:21 pm, nn prueba...@latinmail.com wrote: On Sep 8, 9:55 am, Mart. mdeka...@gmail.com wrote: On Sep 8, 2:16 pm, Andreas Tawn andreas.t...@ubisoft.com wrote: Hi, I need to extract a string after a matching a

Re: Extracting patterns after matching a regex

2009-09-08 Thread nn
On Sep 8, 10:25 am, Mart. mdeka...@gmail.com wrote: On Sep 8, 3:21 pm, nn prueba...@latinmail.com wrote: On Sep 8, 9:55 am, Mart. mdeka...@gmail.com wrote: On Sep 8, 2:16 pm, Andreas Tawn andreas.t...@ubisoft.com wrote: Hi, I need to extract a string after a matching a

Re: Extracting patterns after matching a regex

2009-09-08 Thread nn
On Sep 8, 11:19 am, Dave Angel da...@ieee.org wrote: Mart. wrote: snip I have been doing this to turn the email into a string email =ys.argv[1] f =open(email, 'r') s =str(f.readlines()) so FTPHOST isn't the first element, it is just part of a larger string. When I turn the email

Re: Extracting patterns after matching a regex

2009-09-08 Thread nn
On Sep 8, 12:16 pm, nn prueba...@latinmail.com wrote: On Sep 8, 11:19 am, Dave Angel da...@ieee.org wrote: Mart. wrote: snip I have been doing this to turn the email into a string email =ys.argv[1] f =open(email, 'r') s =str(f.readlines()) so FTPHOST isn't the first

Re: Extracting patterns after matching a regex

2009-09-08 Thread Mart.
On Sep 8, 4:33 pm, MRAB pyt...@mrabarnett.plus.com wrote: Mart. wrote: On Sep 8, 3:53 pm, MRAB pyt...@mrabarnett.plus.com wrote: Mart. wrote: On Sep 8, 3:14 pm, Andreas Tawn andreas.t...@ubisoft.com wrote: Hi, I need to extract a string after a matching a regular expression. For

Re: Extracting patterns after matching a regex

2009-09-08 Thread Mart.
On Sep 8, 3:21 pm, nn prueba...@latinmail.com wrote: On Sep 8, 9:55 am, Mart. mdeka...@gmail.com wrote: On Sep 8, 2:16 pm, Andreas Tawn andreas.t...@ubisoft.com wrote: Hi, I need to extract a string after a matching a regular expression. For example I have the string... s

Re: Extracting patterns after matching a regex

2009-09-08 Thread Terry Reedy
Mart. wrote: If, as Terry suggested, you do have a tuple of strings and the first element has FTPHOST, then s[0].split(:)[1].strip() will work. It is an email which contains information before and after the main section I am interested in, namely... FINISHED: 09/07/2009 08:42:31 MEDIATYPE: