in reply to RE: Re: Regex trouble
in thread Regex trouble

Yes it does:
(?: - group, but don't generate back ref \. - a dot \d+ - followed by one or more digits )? - and the whole thing is optional
So \d+(?:\.\d+)? matches a group of digits, optionally followed by a dot and more digits. So, it matches an integer or a float.

If you want to allow things like "20." (no numbers after the dot) you would have it to \d+(?:\.\d*) (asterisk instead of plus sign after the second \d).

--ZZamboni