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

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
How about something like this? /\d{0,3}\.\d{0,3}/ which should match 0-3 digits followed by a period followed by 0-3 digits. You should be able to see how you can change it if you want to expand how many digits to capture. You could also try: /\d+\.\d+/ Which matches one or more digits

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