[30006] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 1249 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Feb 1 18:09:54 2008

Date: Fri, 1 Feb 2008 15:09:10 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 1 Feb 2008     Volume: 11 Number: 1249

Today's topics:
    Re: "negative" regexp <stoupa@practisoft.cz>
    Re: Calling binary from Perl prog and passing arguments <vinshalvi@gmail.com>
    Re: Magic for object constructor wanted <m@rtij.nl.invlalid>
        Perl regular expressions <allab@sympatico.ca>
    Re: Perl regular expressions <glex_no-spam@qwest-spam-no.invalid>
    Re: Perl regular expressions <news@lawshouse.org>
    Re: Perl regular expressions <m@rtij.nl.invlalid>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Fri, 1 Feb 2008 15:54:51 +0100
From: "Petr Vileta" <stoupa@practisoft.cz>
Subject: Re: "negative" regexp
Message-Id: <fnvc2h$1tr2$1@ns.felk.cvut.cz>

Jürgen Exner wrote:
> In other words unless _YOU_ define a call-back that stores those
> elements nothing will be stored. This way you can extract exactly
> _what_ you want and store it in the _way_ you want it.

Yes, sorry, I confound HTML::Parser and HTML::Tree
-- 
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your
mail from another non-spammer site please.)

Please reply to <petr AT practisoft DOT cz>



------------------------------

Date: Fri, 1 Feb 2008 10:33:25 -0800 (PST)
From: vineet <vinshalvi@gmail.com>
Subject: Re: Calling binary from Perl prog and passing arguments
Message-Id: <4f39ab7f-21a6-4f80-aa76-0e2e37de95d6@l1g2000hsa.googlegroups.com>

Thanks group for your valuable time and advise.
I was looking some thing like expect
Vineet


------------------------------

Date: Fri, 1 Feb 2008 23:18:04 +0100
From: Martijn Lievaart <m@rtij.nl.invlalid>
Subject: Re: Magic for object constructor wanted
Message-Id: <pan.2008.02.01.22.18.04@rtij.nl.invlalid>

On Fri, 01 Feb 2008 11:29:11 +0100, Dr.Ruud wrote:

> Martijn Lievaart schreef:
> 
>> A Dude normally does not
>> get a name once he gets friends, he has a name, so the constructor
>> should set the name.
> 
> Best let the constructor only construct, and make a separate initiator
> to initialize values.

I beg to differ. An object should be in a determined state after each 
method call (and a constructor is a method call). If an empty Dude makes 
sense, no problem. But:

$joe = New Dude;
$joe->init("joe", other parameters);

makes no sense to me. The Dude is ment to be joe, an empty Dude object 
makes no sense here.

M4



------------------------------

Date: Fri, 1 Feb 2008 13:58:10 -0800 (PST)
From: Alona <allab@sympatico.ca>
Subject: Perl regular expressions
Message-Id: <b881c5ea-c94e-4fb2-abd2-2fa85d9df43a@e6g2000prf.googlegroups.com>

Hello All,

We need to extract from a text a 3-digit numbers surrounded by certain
text. For example, we need to extract 199 surrounded by "MESSAGE TYPE"
and "SYSTEM/INPUT":

MESSAGE TYPE 199 SYSTEM/INPUT

What would be Perl regular expression for this?

Thank you,
Alona


------------------------------

Date: Fri, 01 Feb 2008 16:12:22 -0600
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: Perl regular expressions
Message-Id: <47a39946$0$494$815e3792@news.qwest.net>

Alona wrote:
> Hello All,
> 
> We need to extract from a text a 3-digit numbers surrounded by certain
> text. For example, we need to extract 199 surrounded by "MESSAGE TYPE"
> and "SYSTEM/INPUT":
> 
> MESSAGE TYPE 199 SYSTEM/INPUT
> 
> What would be Perl regular expression for this?

This is regular expression 101. What have you tried?


------------------------------

Date: Fri, 01 Feb 2008 22:19:35 +0000
From: Henry Law <news@lawshouse.org>
Subject: Re: Perl regular expressions
Message-Id: <1201904371.1512.0@proxy00.news.clara.net>

Alona wrote:
> Hello All,
> 
> We need to extract from a text a 3-digit numbers surrounded by certain
> text. For example, we need to extract 199 surrounded by "MESSAGE TYPE"
> and "SYSTEM/INPUT":
> 
> MESSAGE TYPE 199 SYSTEM/INPUT
> 
> What would be Perl regular expression for this?

$yourtext =~ m!MESSAGE TYPE (\d{3}) SYSTEM/INPUT!;

Now, what is your real question?  It will take you a long time to get 
your program written one line at a time.

-- 

Henry Law            Manchester, England


------------------------------

Date: Fri, 1 Feb 2008 23:19:23 +0100
From: Martijn Lievaart <m@rtij.nl.invlalid>
Subject: Re: Perl regular expressions
Message-Id: <pan.2008.02.01.22.19.23@rtij.nl.invlalid>

On Fri, 01 Feb 2008 13:58:10 -0800, Alona wrote:

> Hello All,
> 
> We need to extract from a text a 3-digit numbers surrounded by certain
> text. For example, we need to extract 199 surrounded by "MESSAGE TYPE"
> and "SYSTEM/INPUT":
> 
> MESSAGE TYPE 199 SYSTEM/INPUT
> 
> What would be Perl regular expression for this?

If you read perldoc perlre you would quickly see that this would be

/MESSAGE TYPE (\d+) SYSTEM\/INPUT/

HTH,
M4


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V11 Issue 1249
***************************************


home help back first fref pref prev next nref lref last post