Hello,
I have a regular expression that is used to take data from a table.
while($innerTable =~ m/\ \ \ (.*?)\<\/A\> \<\/TD\> \ (.*?)
\<\/TD\> \ (.*?) \<\/TD\> \(\s*\ (.*?)\<\/A\>=[0-9]+\s*(\<\/A\>)*\s*)*\<\/TD\>/gs)
{
print "$1 $2 $3 $5\n";
}
This matches the pattern f
On Thu, 3 Feb 2005 12:11:14 +0100, Tommy Nordgren
<[EMAIL PROTECTED]> wrote:
>
> My problem is to generate from specs the lexical analyzer and parser
> for the semantic
> actions, which I wan't to allow writing in any object oriented language.
>
> The language to use will be specified in the inp
Feb 3, 2005 kl. 4:25 AM skrev Tommy Nordgren:
I have the need to generate and match a large number (Typically 50 -
200) of regular expressions.
Each regular expression should be written in a subset of the perl
regular expression syntax, or another suitable syntax. I have not
committed to a speci
Tommy Nordgren [TN], on Thursday, February 3, 2005 at 04:25 (+0100)
typed the following:
TN> I have the need to generate and match a large number (Typically 50 -
TN> 200) of regular expressions.
TN> Each regular expression should be written in a subset of the perl
TN> regular expression syntax, o
I have the need to generate and match a large number (Typically 50 -
200) of regular expressions.
Each regular expression should be written in a subset of the perl
regular expression syntax, or another suitable syntax. I have not
committed to a specific subset yet.
The patterns are not allowed t
>ord() returns the _decimal_ number 13 (octal 015, hexadecimal x0D)
which is
>the CR (carriage return) character *NOT* the VT (vertical tab)
character.
Well, that would be my problem. Thank you
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Matt Matijevich wrote:
I am having troubles matching the Vertical Tab character using regular
expressions.
I have a string, I have looped through every character in the string
and printed out the value returned from ord(), and I get 13 for one of
my chars.
I have searched and apparently that is the
I am having troubles matching the Vertical Tab character using regular
expressions.
I have a string, I have looped through every character in the string
and printed out the value returned from ord(), and I get 13 for one of
my chars.
I have searched and apparently that is the vertical tab charact
ng is."
--Albert Einstein
> From: "John W. Krahn" <[EMAIL PROTECTED]>
> Date: Tue, 07 Dec 2004 11:55:48 -0800
> To: Perl Beginners <[EMAIL PROTECTED]>
> Subject: Re: Another regular expression matching quandry
>
> Jeffrey Paul Burger wrote:
>&g
On Tue, 7 Dec 2004, Charles K. Clarkson wrote:
> Chris Devers <[EMAIL PROTECTED]> wrote:
>
> : I have a similar script on my site, but I use it to select
> : a random stylesheet instead of a random image. Same idea
> : though.
> :
> : #!/usr/bin/perl -w
> :
> : use strict;
> : use CGI;
>
Jeffrey Paul Burger wrote:
I've read a directory into an array called @file_list and need to remove any
files that start with period from the list (".", "..", ".DS_Store", etc.).
This is what I've got so far, but it's only removing "..", still leaving "."
and ".DS_Store". Does the period need to be
Chris Devers <[EMAIL PROTECTED]> wrote:
: I have a similar script on my site, but I use it to select
: a random stylesheet instead of a random image. Same idea
: though.
:
: #!/usr/bin/perl -w
:
: use strict;
: use CGI;
:
: my $q = new CGI;
: my @sheets = <*.css>;
:
: use List::Uti
On Tue, 07 Dec 2004 11:07:54 -0700, Jeffrey Paul Burger <[EMAIL PROTECTED]>
wrote:
> I've read a directory into an array called @file_list and need to remove any
> files that start with period from the list (".", "..", ".DS_Store", etc.).
> This is what I've got so far, but it's only removing ".."
On Tue, 7 Dec 2004, Jeffrey Paul Burger wrote:
> FYI, the ultimate goal of the routine this is part of is to randomly
> select a file corresponding to specified graphic file types within a
> directory or subdirectory. Since the directories in question will
> typically only contain graphic files
I've read a directory into an array called @file_list and need to remove any
files that start with period from the list (".", "..", ".DS_Store", etc.).
This is what I've got so far, but it's only removing "..", still leaving "."
and ".DS_Store". Does the period need to be escaped somehow? Help!
fo
Stout, Joel R [SJR], on Tuesday, December 7, 2004 at 00:55 (-)
typed:
SJR> use File::Basename;
SJR> $fullname = "/usr/local/pics/sample.tiff"; #for example
SJR> ($file,$dir,$_) = fileparse($fullname, qr/\..*/);
SJR> if (/\.(tif|tiff|jpg|jpeg)$/) {
SJR> print "This is an image file.\n";
SJR
\.(tif|tiff|jpg|jpeg)$/) {
print "This is an image file.\n";
};
-Original Message-
From: Paul Ohashi [mailto:[EMAIL PROTECTED]
Sent: Monday, December 06, 2004 4:24 PM
To: [EMAIL PROTECTED]
Subject: FW: Trouble with compound regular expression matching
Hmmm.. I'm new to
Paul Ohashi [PO], on Monday, December 6, 2004 at 16:24 (-0800) made
these points:
PO> I did need to add the case-insensitivity to the regex:
PO>/^.*\.[tj][pi][gfe].*$/i
PO> That's better, I think.
I'm not sure if this is good solution, because it matches also those,
you won't:
tpg, tpf, tpe,
Jeffrey Paul Burger [JPB], on Monday, December 06, 2004 at 17:05
(-0700) typed the following:
JPB> if ($file_name !~ /tif$/i) {}
JPB> if ($file_name !~ m/tif\b/i) {}
JPB> if ($file_name !~ m/.*.tif/i) {}
what about this:
print "PIC is $1" if ($file_name =~ /\.(tif?f|jpe?g)$/i);
--
...m8s, cu
: <[EMAIL PROTECTED]>
> Date: Mon, 6 Dec 2004 17:13:54 -0700
> To: <[EMAIL PROTECTED]>
> Cc: Jeffrey Paul Burger <[EMAIL PROTECTED]>
> Subject: Re: Trouble with compound regular expression matching
>
> On Monday 06 December 2004 05:05 pm, Jeffrey Paul Burger wrote
Sorry bout that blank email...
anyway... I thnk this would work
$filename =~ /(?:jpe?g$)|(?:tif?f$)/i
I think this one is wrong because you actually have
two patterns here...
if ($file_name !~ /tif$/i | /jpg$/i) {}
maybe you could try doing it like this..
if($file_name !~ /(tif$)|(jpg$)/i
no
--- Jeffrey Paul Burger <[EMAIL PROTECTED]> wrote:
> I tried everything I could think of to get this to
> work before pleading for
> help!
>
> I need to check if a file is either a TIFF or JPEG
> graphics file.
> (Case-insensitive variations of qualifying suffixes
> would be .tif, .tiff,
> .jpg
> Okay, now I have to admit I'm also new to Perl, but I can adapt to change:
>
> /^.*\.[tj][pi][gfe].{0,1}$/i
>
> I threw in the quantifier to avoid what Felix exposed. Now, there's
> probably a hole in this somewhere, but it's got to be a small one...
>
> -Paul
>
Zeroth: It would better
---
From: Felix Li [mailto:[EMAIL PROTECTED]
Sent: Monday, December 06, 2004 4:38 PM
To: Paul Ohashi
Subject: Re: Trouble with compound regular expression matching
print "No!" if "i.tied.my.shoes" =~/^.*\.[tj][pi][gfe].*$/i;
- Original Message -
From: "Paul
om: Paul Ohashi
Sent: Monday, December 06, 2004 4:19 PM
To: 'Jeffrey Paul Burger'
Subject: RE: Trouble with compound regular expression matching
This one worked for me:
/^.*\.[tj][pi][gfe].*$/
Hope this helps
- Paul
-Original Message-
From: Jeffrey Paul Burger [mail
On Monday 06 December 2004 05:05 pm, Jeffrey Paul Burger wrote:
> I tried everything I could think of to get this to work before pleading for
> help!
>
> I need to check if a file is either a TIFF or JPEG graphics file.
> (Case-insensitive variations of qualifying suffixes would be .tif, .tiff,
> .
I tried everything I could think of to get this to work before pleading for
help!
I need to check if a file is either a TIFF or JPEG graphics file.
(Case-insensitive variations of qualifying suffixes would be .tif, .tiff,
.jpg and .jpeg.) So far I have three difference versions of what seem to be
On Sep 25, Kredler Stefan said:
>I'd like to match numbers and add them to an array if the array does not
>contain the number.
You'd want to use a hash, not an array.
>let's assume $part[1] can hold the values in consecutive order e.g. 5, 1005,
>5, 2000 then
>
>next if (grep /$part[1]/,
Hello,
I'd like to match numbers and add them to an array if the array does not
contain the number.
let's assume $part[1] can hold the values in consecutive order e.g. 5, 1005,
5, 2000 then
next if (grep /$part[1]/, @tnumlist);
push @tnumlist,$part[1];
would yield @tnumlist
29 matches
Mail list logo