lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Tue, Jul 29, 2003 at 01:49:53PM -0300, Roberto Ierusalimschy wrote:
> There is no way to define that pattern in Lua. What I do is to use
> an approximation and solve the details inside a "replace" function:
>   string.gsub(s, "^%-?%d+(%.?%d?%d?)$", function (p, s)
>     if s == "" or string.len(s) == 3 then ...

Looks like I'm going to have to use something like a v8 regexp
interface, or perhaps a pcre one.

Thanks for clearing that up for me.

D.

-- 
Daniel Silverstone                               http://www.digital-scurf.org/
Hostmaster, Webmaster, and Chief Code Wibbler          Digital-Scurf Unlimited
GPG Public key available from keyring.debian.org               KeyId: 20687895
"... all the modern inconveniences ..."
		-- Mark Twain