in reply to Regex woes...
That said, you might want to replace the (-) not with -? but with [-+]?. [-+] creates a character class matching - or +, so it would allow numbers like +157.0.
I think you probably want a $ or \z at the end of your regex to say that the end must be either the end of the string or a newline before it (for $), or the end of the string, no exceptions, (for \z.)
perlre is your friend, as always.
update: As adamsj pointed out you also used - instead of , with \d{1-3}. I read too fast to notice.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Regex woes...
by adamsj (Hermit) on Jul 09, 2001 at 03:55 UTC | |
by wog (Curate) on Jul 09, 2001 at 04:06 UTC | |
by japhy (Canon) on Jul 09, 2001 at 07:17 UTC |