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
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+
\
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
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