From: Clifford Heath Date: 2008-02-05T13:25:00+09:00 Subject: Re: Treetop problem Day wrote: > you want something that matches /^\D$/ as well as [A-Za-z0-9]+. There's no \D in Treetop character classes, unlike Ruby regexps. > but is my thinking clear, anyway? Your thinking is clear, but Marco's isn't. Marco, think about what you're asking. You want to match a string of digits as a string, but also as a number. How is Treetop supposed to know which? Is it that with a number, the following character is not alphanumeric? If so, you must tell Treetop that: rule number [0-9.]+ & ![A-Za-z0-9.] end Clifford Heath.