Re: Not following the match problem in this simplified example

2009-10-29 Thread Dr.Ruud
Harry Putnam wrote: my $date_re = qr/^Date:/; my $other_re = qr/^Date: some date/; if (/$date_re/ !~ /$other_re/){ That code is bizar! What exactly do you want to compare? 1. Whether both matches succeed in the same way? 2. Whether both regexps contain similar code? 3. none of the above --

Re: Not following the match problem in this simplified example

2009-10-29 Thread Harry Putnam
Dr.Ruud rvtol+use...@isolution.nl writes: Harry Putnam wrote: my $date_re = qr/^Date:/; my $other_re = qr/^Date: some date/; if (/$date_re/ !~ /$other_re/){ That code is bizar! What exactly do you want to compare? 1. Whether both matches succeed in the same way? 2. Whether both

Not following the match problem in this simplified example

2009-10-28 Thread Harry Putnam
What follows is snippet out of a more complex script and reworked to simplify but still not seeing what causes the problem. I'm not sure if I've just stared at it too long or what. When I run it I get this error: Use of uninitialized value in pattern match (m//) at ./match.pl line 14.

Re: Not following the match problem in this simplified example

2009-10-28 Thread Jim Gibson
On 10/28/09 Wed Oct 28, 2009 9:37 AM, Harry Putnam rea...@newsguy.com scribbled: What follows is snippet out of a more complex script and reworked to simplify but still not seeing what causes the problem. I'm not sure if I've just stared at it too long or what. When I run it I get this

Re: Not following the match problem in this simplified example

2009-10-28 Thread Harry Putnam
Jim Gibson jimsgib...@gmail.com writes: We need to know what you are trying to accomplish here. Its over 300 lines of code at this writing. Where the re come in: The program searches only headers for a given RE, but it also returns the date line in any messages where the RE hits pay dirt.

Re: Not following the match problem in this simplified example

2009-10-28 Thread Jim Gibson
On 10/28/09 Wed Oct 28, 2009 10:43 AM, Harry Putnam rea...@newsguy.com scribbled: Jim Gibson jimsgib...@gmail.com writes: We need to know what you are trying to accomplish here. Its over 300 lines of code at this writing. Well we definitely do not want to see all 300 lines. However,

if (match) problem

2009-03-10 Thread Dermot
Hi, I am not getting the results that I expect from this test and I am not sure why. If I run the script below I get: 1..3 Line=???/FOO BAR, Name=Joe Smo M=??? ok 1 - handle_name ???/FOO BAR Line=change accordingly /FOO BAR, Name=Foo bar M=change ok 2 - handle_name change accordingly /FOO BAR

Re: if (match) problem

2009-03-10 Thread Jim Gibson
On 3/10/09 Tue Mar 10, 2009 7:59 AM, Dermot paik...@googlemail.com scribbled: Hi, I am not getting the results that I expect from this test and I am not sure why. If I run the script below I get: 1..3 Line=???/FOO BAR, Name=Joe Smo M=??? ok 1 - handle_name ???/FOO BAR Line=change

Re: if (match) problem

2009-03-10 Thread Dermot
2009/3/10 Jim Gibson jimsgib...@gmail.com: On 3/10/09 Tue  Mar 10, 2009  7:59 AM, Dermot paik...@googlemail.com scribbled: Hi, I am not getting the results that I expect from this test and I am not sure why. If I run the script below I get: 1..3 Line=???/FOO BAR, Name=Joe Smo M=??? ok 1

regular expression match problem

2005-10-25 Thread Pine Yan
This is a segment of code to do string search: my $email = \pineyan; my $name = \\pine; if($email =~ /($name)/) { print Found my name: $name!\n; } and I got the following error when running: Can't find unicode character property definition via main-i or i.pl at unicode/Is/i.pl

Re: regular expression match problem

2005-10-25 Thread Jeff 'japhy' Pinyan
On Oct 25, Pine Yan said: This is a segment of code to do string search: my $email = \pineyan; my $name = \\pine; if($email =~ /($name)/) { print Found my name: $name!\n; } and I got the following error when running: Can't find unicode character property definition via main-i

pattern match problem

2003-02-13 Thread tao wang
hi, I'm trying to write a script to match a pattern like this: 1.10 I wrote [\d.]+, but this also match with pattern ... , which has no number in it. Could somebody help me with it? I'm new to perl and scripts. thanks a lot. - tao __

RE: pattern match problem

2003-02-13 Thread Wagner, David --- Senior Programmer Analyst --- WGO
tao wang wrote: hi, I'm trying to write a script to match a pattern like this: 1.10 I wrote [\d.]+, but this also match with pattern ... , which has no number in it. Could somebody help me with it? I'm new to perl and scripts. thanks a lot. /^\d+\.\d+/ which says anchor at

RE: pattern match problem

2003-02-13 Thread Timothy Johnson
To: [EMAIL PROTECTED] Subject: pattern match problem hi, I'm trying to write a script to match a pattern like this: 1.10 I wrote [\d.]+, but this also match with pattern ... , which has no number in it. Could somebody help me with it? I'm new to perl and scripts. thanks a lot. - tao

Re: pattern match problem

2003-02-13 Thread Wiggins d'Anconia
tao wang wrote: hi, I'm trying to write a script to match a pattern like this: 1.10 I wrote [\d.]+, but this also match with pattern ... , which has no number in it. Could somebody help me with it? I'm new to perl and scripts. thanks a lot. \d.\d+ \d+.\d+ \d*.\d* \d+\.+\d+ \d+\.*\d+

Re: pattern match problem

2003-02-13 Thread ktb
On Thu, Feb 13, 2003 at 04:39:17PM -0800, tao wang wrote: hi, I'm trying to write a script to match a pattern like this: 1.10 I wrote [\d.]+, but this also match with pattern ... , which has no number in it. Could somebody help me with it? I'm new to perl and scripts. thanks a

RE: Split and pattern match problem

2001-09-12 Thread Bradshaw, Brian
Thanks for the info I got. I wound up with: @stringT = split(/select\D.*?\/select/i, $qText); to do what I needed. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Split and pattern match problem

2001-09-11 Thread Bradshaw, Brian
Hello List, I am hoping I can get some help here. I admit, I am very weak on pattern matches. I have a string that I want to substitute words for each select tag. I am pretty sure I want to split the string at the select tags, then join pieces with each answer in its proper place. However, I

Re: Split and pattern match problem

2001-09-11 Thread Andrea Holstein
Jason Tiller wrote: ... #!/usr/bin/perl # Store the text you provided in your e-mail as a big string. $text = BOB; # Remove new lines, splitting into an array. @text = split( \n, $text ); # Now weld the string back together, with spaces instead of newlines! $text = join( ,

Re: Split and pattern match problem

2001-09-11 Thread Jason Tiller
Hi, Andrea, :) On Wed, 12 Sep 2001, Andrea Holstein wrote: Jason Tiller wrote: # Find the string bounded by select and /select. The '.+?' # finds all characters but isn't greedy; .+ would match all of the # characters between the first select and the *last* /select. # Store this