On Thu, Jul 07, 2011 at 10:35:56PM +0200, mouss wrote:
> /^[0-9\.]$/
> is equivalent to
> any string formed with digits and/or dots
No, just any single character that is a digit or ".". You left off the
"*" or "+" to make it a string composed of one (or zero) or more of said.
> with pcre; you can shorten this to
> /^[\.\d]+$/
>
> but for your fqrdns, there is no point being that precise. it's enough to do
> /(:\d$)/ DUNNO
>
> this means ignore anything that ends with a digit or contains a ':'.
No. This is ends with a ":" that is followed by a digit. The expression
for contains a ":" or ends with a digit is:
/:|\d$/
--
Viktor.