Re: Perl Regular Expression Problem

2005-08-23 Thread $Bill Luebkert
[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

Re: Perl Regular Expression Problem

2005-08-23 Thread Chris Wagner
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

2005-08-23 Thread paul_schwotzer
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

RE: Regular Expression problem?

2003-09-26 Thread Carl Jolley
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

RE: Regular Expression problem?

2003-09-25 Thread Xu, Qiang (XSSC SGP)
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

RE: Regular Expression problem?

2003-09-25 Thread Xu, Qiang (XSSC SGP)
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

RE: Regular Expression problem?

2003-09-25 Thread Xu, Qiang (XSSC SGP)
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 __

Re: Regular Expression problem?

2003-09-25 Thread Glenn Linderman
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

RE: Another Regular expression problem

2003-03-10 Thread Joseph P. Discenza
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###

Re: Another Regular expression problem

2003-03-10 Thread Electron One
; > -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 >

Re: Another Regular expression problem

2003-03-10 Thread Ted Zeng
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 > > >

RE: Another Regular expression problem

2003-03-10 Thread Stovall, Adrian M.
> -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, > >

Another Regular expression problem

2003-03-10 Thread Electron One
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

RE: Regular Expression Problem

2002-11-20 Thread Joseph P. Discenza
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[

Re: Regular Expression Problem

2002-11-20 Thread csaba . raduly
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

Re: Regular Expression Problem

2002-11-20 Thread Lee Cullip
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

RE: Regular Expression Problem

2002-11-20 Thread Joseph P. Discenza
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

Regular Expression Problem

2002-11-20 Thread Lee Cullip
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