Octavian Rasnita wrote:
Hi all,
I want to select all the content of a table from a file using regular
expressions (and not a module).
Can you give me some hints about how can I do this?
Uh, use a module.
For example I have the following text:
..
..
... ...
As you see, I
Hi all,
I want to select all the content of a table from a file using regular
expressions (and not a module).
Can you give me some hints about how can I do this?
For example I have the following text:
..
..
... ...
As you see, I could find more other tables included in
none).
$test =~ /foo.*?bar/;
Also...
+ = 1 or more (greedy)
+? = 1 or more, non-greedy.
Rob
-Original Message-
From: Rob Benton [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 2:07 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: Problem with regular expressions!!!
H
How does it translate?
* = 0 or more of preceding char
? = 1 or 0 of preceding char
*? = ???
On Tue, 2003-03-18 at 21:41, Michael Kelly wrote:
> On Tue, Mar 18, 2003 at 05:53:45PM -0600, Rob Benton wrote:
> > It looks odd to me b/c * and ? are both quantifiers...
>
> * and ? alone are both quan
On Tue, Mar 18, 2003 at 05:53:45PM -0600, Rob Benton wrote:
> It looks odd to me b/c * and ? are both quantifiers...
* and ? alone are both quantifiers, but *? is a non-greedy *.
--
Michael
[EMAIL PROTECTED]
http://www.jedimike.net/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional c
On Tuesday, Mar 18, 2003, at 15:46 US/Pacific, Peter Kappus wrote:
I also had no problem...
"myfile.jpeg" =~ /(.*?)\.(.*)/;
print $2;
gives me "jpeg"
Can we see the rest of your code?
I think the problem may be in the value of $file_completename...
[..]
I think the OP may have a problem with wh
Hughes, Andrew wrote:
This is a newbie observation, but aren't you not supposed to name one of
your own variables with a number as the first value after a $, @, or % as in
the case of $2? Could this be part of the problem?
Just to make sure this doesn't slip through, in his case $2 refers to
th
I also had no problem...
"myfile.jpeg" =~ /(.*?)\.(.*)/;
print $2;
gives me "jpeg"
Can we see the rest of your code?
I think the problem may be in the value of $file_completename...
-Peter
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ll keep looking at it.
A questio: Should the 'split' version of the same code be faster?
Original Message Follows
From: "Kipp, James" <[EMAIL PROTECTED]>
To: "'Marcelo Taube'" <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
Subject: RE: Problem
It looks odd to me b/c * and ? are both quantifiers which usually
triggers an error when you try to run it. See if this works for you:
$file_completename =~ /([^.]*)\.(.*)/;
On Tue, 2003-03-18 at 15:28, Marcelo Taube wrote:
> As u probably have guessed some part of my code is not working proper
On Tue, 18 Mar 2003, Marcelo Taube wrote:
> As u probably have guessed some part of my code is not working properly and
> i don't understand why!!
>
> This is the code.
> #
> $file_completename =~ /(.*?)\.(.*)/;
> if ($2 eq $extension]) {
> #DO SOMETHING!!!
>
>
> This is the code.
> #
> $file_completename =~ /(.*?)\.(.*)/;
> if ($2 eq $extension]) {
> #DO SOMETHING!!!
> }
> #
did u turn on warnings and use strict ??
did you catch the ] at the end of $extension?
i tried this on
esday, March 18, 2003 4:29 PM
To: [EMAIL PROTECTED]
Subject: Problem with regular expressions!!!
As u probably have guessed some part of my code is not working properly and
i don't understand why!!
This is the code.
#
$file_completename =~ /(.*?)\.(.*)/;
As u probably have guessed some part of my code is not working properly and
i don't understand why!!
This is the code.
#
$file_completename =~ /(.*?)\.(.*)/;
if ($2 eq $extension]) {
#DO SOMETHING!!!
}
#
As u see, i'm trying
Hi thank you.
I have talked with Lenny Muellner from O'Reilly because I am blind and they
offer the books for free for the blind, but even though he gave me the
books I've asked for free, he told me that he has not the book "Mastering
Regular Expressions" available.
Ted
Octavian Rasnita wrote at Sun, 09 Jun 2002 08:42:34 +0200:
> Hi all,
>
> I want to check if in a string there are more than 3 capital letters. I've tried
>using:
>
> if ($string=~ /[A-Z]{3,}/) {
>
> }
> }
> This match at least 3 capitals only if they are one after another. I want to check
Teddy --
...and then Octavian Rasnita said...
%
% Hi all,
Hello!
%
% Do you know if there is an electronic version of "Mastering Regular
% Expressions" book that I can find?
Other than the CD version, also for sale from ORA, probably not; it's a
still-in-print book that
Teddy --
...and then Octavian Rasnita said...
%
% Hi all,
Hello!
%
% I want to check if in a string there are more than 3 capital letters.
% I've tried using:
%
% if ($string=~ /[A-Z]{3,}/) {
...
%
% For example, I want to match this string: "AxxxBxxxCxxx".
That's not so bad:
[zero] [9
Hi all,
Do you know if there is an electronic version of "Mastering Regular
Expressions" book that I can find?
Thank you very much!
Teddy,
[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi all,
I want to check if in a string there are more than 3 capital letters.
I've tried using:
if ($string=~ /[A-Z]{3,}/) {
}
This match at least 3 capitals only if they are one after another.
I want to check if the string contains at least 3 capitals, doesn't matter
how are they position
Scot Robnett wrote at Tue, 04 Jun 2002 16:46:26 +0200:
>> He said he wanted to replace all nonalphanumerics, and I was assuming that meant
>white space as
>> well, regardless of where in the string it is located.
>>
>> Scot
>
>>> $foo =~ s/\W*/_/g;
>>>
>>> http://www.oreilly.com/catalo
]
Subject: RE: Replacing with Regular expressions
Scot Robnett wrote at Tue, 04 Jun 2002 05:13:13 +0200:
>> $foo =~ s/\W*/_/g;
>>
>> http://www.oreilly.com/catalog/regex/
> ...
>
> I want to allow only the a-z, A-Z, and 0-9 characters and I want to
replace all o
Scot Robnett wrote at Tue, 04 Jun 2002 05:13:13 +0200:
>> $foo =~ s/\W*/_/g;
>>
>> http://www.oreilly.com/catalog/regex/
> ...
>
> I want to allow only the a-z, A-Z, and 0-9 characters and I want to replace all
>others with _ when
> writing the file to the server.
>
> Can you tell m
$foo =~ s/\W*/_/g;
http://www.oreilly.com/catalog/regex/
-Original Message-
From: Octavian Rasnita [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 03, 2002 3:06 AM
To: [EMAIL PROTECTED]
Subject: Replacing with Regular expressions
Hi all,
I have a path to a file name
Hi all,
I have a path to a file name. (In a script for uploading files).
I want to allow only the a-z, A-Z, and 0-9 characters and I want to replace
all others with _ when writing the file to the server.
Can you tell me what would be this regular expression?
Thank you.
Teddy,
[EMAIL PROTECTED
Wouldn't single quotes do the trick?
Curtis Poe <[EMAIL PROTECTED]> wrote: --- W P wrote:
> i don't want to just escape those characters. they were merely examples. i
> was hoping maybe there was some built-in way to escape ALL the characters
> that mean anything to r
--- W P <[EMAIL PROTECTED]> wrote:
> i don't want to just escape those characters. they were merely examples. i
> was hoping maybe there was some built-in way to escape ALL the characters
> that mean anything to regular expressions.
Well, technically, *all* characters
i don't want to just escape those characters. they were merely examples. i
was hoping maybe there was some built-in way to escape ALL the characters
that mean anything to regular expressions. it just seemed like a lot of
work to put a \ before all the characters that regular expres
On Wed, 27 Feb 2002, W P wrote:
> I have a CGI script which takes two strings. It searches for the first
> string in a file, replacing it with the second one. This file isn't
> really important, more for fun, so I'm not too worried about people
> deleting the whole file if they actually type out
GsuLinuX wrote:
> How can i convert
>
> 1. " $a = 29.7548925547539 > $a = 29.75 "
i'd use printf:
my $a = 29.7548925547539;
printf "%5.2f\n", $a; # this prints 29.75
> 2. " $b = 2345342 --> $b = 2,345,342"
look into numbe
Hi from İstanbul,
How can i convert
1. " $a = 29.7548925547539 > $a = 29.75 "
2. " $b = 2345342 --> $b = 2,345,342"
thanx
Derya
Istanbul
I have a CGI script which takes two strings. It searches for the first string in a
file, replacing it with the second one. This file isn't really important, more for
fun, so I'm not too worried about people deleting the whole file if they actually type
out the contents as the first string. Ho
o me what that regular
> expression means. It is kind of an emergency.
>
> And, if someone knows a link where there is more information about regular
> expressions, I would be grateful.
>
> Thanks in advance.
>
> Lilian
--
[Writing CGI Applications with Perl - http
are replacing some things but cannot understand what. Specially
the second one.
I would really appreciate if somebody could explain to me what that regular
expression means. It is kind of an emergency.
And, if someone knows a link where there is more information about regular
expressions, I would be
- Original Message -
From: "Octavian Rasnita" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 07, 2002 4:37 PM
Subject: regular expressions
> Hi all,
> Do you know where I can find a good free tutorial or manual for the regular
> e
Hi all,
Do you know where I can find a good free tutorial or manual for the regular
expressions in Perl?
Thank you.
Teddy,
My dear email address is [EMAIL PROTECTED]
_
Do You Yahoo!?
Get your free @yahoo.com address at http
36 matches
Mail list logo