[EMAIL PROTECTED] wrote:
> Perl Regular Expression Problem
>
> We are having a problem with Perl's evaluation of regular expressions.
>
> Here is a code snippet:
>
># This regular expression is looking for a word ending in "s" followed
># by somet
It works as expected for me and it's build 811. At this point I would take
it onto Bugtraq. Something's not right with ur build
C:\WINDOWS\Desktop>perl
$method = 'Modules("M6833x LA")';
$method =~ /(\S+)s\s*\(\s*(.+)\s*\)\s*$/;
$method = $1 . "s";
print( "POST METHOD [$method]\n" );
POST METHOD
Perl Regular Expression Problem
We are having a problem with Perl's evaluation of regular expressions.
Here is a code snippet:
# This regular expression is looking for a word ending in "s" followed
# by something in parentheses
# If the while-block is entered, $1 sho
On Fri, 26 Sep 2003, Xu, Qiang (XSSC SGP) wrote:
> Ted S. wrote:
> > Beckett Richard-qswi266 graced perl with these words of wisdom:
> >> That should have been s/.*\///
> >
> > Don't you have to escape the period, too?
> >
> > s/\.*\///
>
> No, we shouldn't, because here "." stands for any single
Glenn Linderman wrote:
> Any delimiter can be used (other posters were correct about that).
> The delimiter used affects which delimiter character would need to be
> escaped in the regular expression. Generally, if something other
> than / is used as the delimiter character, it is chosen because
Strohmeier Ruediger wrote:
> Hi Xu Qiang,
>
> unlike e.g. awk, vi or the shell, perl support different delimiter
> for regexes. When a slash is part of the regex or the substitution
> pattern, they can either be escaped (i.e. \/) or other characters can
> be used as delimiters.
>
> Thus the reg
Ted S. wrote:
> Beckett Richard-qswi266 graced perl with these words of wisdom:
>> That should have been s/.*\///
>
> Don't you have to escape the period, too?
>
> s/\.*\///
No, we shouldn't, because here "." stands for any single character except a
new line.
thx,
Regards,
Xu Qiang
__
On approximately 9/25/2003 6:45 AM, came the following characters from
the keyboard of Xu, Qiang (XSSC SGP):
Hi, all:
I have a regular expression that I can't understand.
Suppose $filename is a file name that includes the full path. Say, it is
"/u/scan/abc.jpg",
The regular expression is: $fil
Electron One wrote, on Monday, March 10, 2003 13:12
: while(<>){
: chomp;
: if(/\s*\$[a-z]\w+\s*/i){
: #if(/\b\$[a-z]\w+\b/i){
: print "Matched: $` -- $& -- $' :\n";
: }
: else{
:print "No match:$_\n";
: }
: }
:
: testfile.txt###
; > -Original Message-
> > From: Electron One [mailto:[EMAIL PROTECTED]
> > Sent: Monday, March 10, 2003 12:12 PM
> > To: [EMAIL PROTECTED]
> > Cc: Electron One
> > Subject: Another Regular expression problem
>
Message-
> > From: Electron One [mailto:[EMAIL PROTECTED]
> > Sent: Monday, March 10, 2003 12:12 PM
> > To: [EMAIL PROTECTED]
> > Cc: Electron One
> > Subject: Another Regular expression problem
> >
>
> -Original Message-
> From: Electron One [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 10, 2003 12:12 PM
> To: [EMAIL PROTECTED]
> Cc: Electron One
> Subject: Another Regular expression problem
>
>
> Hello Everyone,
>
>
Hello Everyone,
I have a perl file that has this,
PerlFile.pl###
#!/usr/bin/perl
while(<>){
chomp;
if(/\s*\$[a-z]\w+\s*/i){
#if(/\b\$[a-z]\w+\b/i){
print "Matched: $` -- $& -- $' :\n";
}
el
Lee Cullip wrote, on Wednesday, November 20, 2002 08:06
: $prmpt =~ /^(.*:\/home\/oracle[:=>]{1,2})/;
: $telnet = new Net::Telnet(-prompt => $prmpt, -Errmode => 'die');
: I still get the following error message though :
:
: bad match operator: opening delimiter missing:
: ^(.*:/home/oracle[
On 20/11/2002 13:06:29 Lee Cullip wrote:
>Thanks for replying Joe,
>maybe if you see a bit more code you can get an idea for what I'm trying
to
>do :
>
>use Net::Telnet;
>use IO::File;
>
>$prmpt =~ /^(.*:\/home\/oracle[:=>]{1,2})/;
[snip]
>
>I still get the following error message though :
>
>ba
WTH am I doing wrong ?
TIA
Lee
- Original Message -
From: "Joseph P. Discenza" <[EMAIL PROTECTED]>
To: "Lee Cullip" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, November 20, 2002 12:35 PM
Subject: RE: Regular Expression Problem
Lee Cul
Lee Cullip wrote, on Wednesday, November 20, 2002 06:50
: Can anybody tell me what is wrong with the following line ?
:
: $prmpt = /(^.*[:]\/home\/oracle[:=>]{1,2})/;
:
: I'm trying to use the value of $prmpt in a call to Net::Telnet but before I can
: use the variable $prmpt, perl is complainin
Can anybody tell me what is wrong with the
following line ?
$prmpt =
/(^.*[:]\/home\/oracle[:=>]{1,2})/;
I'm trying to use the value of $prmpt in a call to
Net::Telnet but before I can use the variable $prmpt, perl is complaining about
the format of the pattern. Any help would be appr
18 matches
Mail list logo