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. thank

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 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 follo

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 ancho